Is it possible with the orderStrategy feature to send a mix of OCO and OSO ?
What I am trying to do is have a stop loss and profit target, and if the profit target is hit then it only closes say 50% of the position, leaving the remaining 50% with a trailing stop loss (eg a runner type approach).
I have the OCO working with just a profit and stop loss, but have not been able to figure out how to setup something like the above.
Perhaps more important, is that Tradovate has broken the strategyOrder. They have barely acknowledged it and have removed it from their web Trading platform.(I can’t find it anymore at least) Those of us who were using the API have been unable to even get their previously working examples to function.
Sadly, until they fix it there’s not much you can do. It also doesn’t seem like a priority since it’s been well over a month since the issue was identified.
You could actually execute the strategy that you want via API without startOrderStrategy.
What you’d do is place 2 separate OSOs. They’d both have the same entry parameters, but one would have a bracket1 parameter that was just a trailing stop. The other would have both bracket1 and bracket2 parameters filled in, creating an OCO. One would be a trailing stop, the other would be a take profit to sell the 50% of your initial position. Then the uncapped one will trail until it either taps out with the capped order, or it will continue beyond your first profit target.
You can use the orderType field in the brackets to specify the type among these: "Limit" "Market" "Stop" "StopLimit" "TrailingStop" "TrailingStopLimit".
Each order type’s required parameters may vary - TrailingStopLimit needs both a price and a stopPrice while a Limit only needs price.
Thanks, can this be placed at the same time the original order entry goes in ? eg so I don’t have to have a risk of a position getting filled and then not having the exit orders applied
Each OSO when filled will the send the linked exit orders. You could play with the orderType parameters for your bracket1 and bracket2 fields a bit too - try a regular stop on one combined with a trailing stop on the other maybe (or even a trailing stop limit), depending on your preferences.
Alexander, first of all let me thank you for all the great help you are providing on this forum.
I was wondering if there is a way, via the placeoso or placeoco endpoints to have brackets that specify a take profit target by ticks or delta price.
I understand we can set hardcoded trailingstop and limit orders with calculated prices targets, but I was wondering if there is a way, just like we can do in startorderstragy and specify profitTarget and stopLoss in ticks.
You’ll likely need to write something by hand. What you’d do is take the entry order’s price. Then you’d use a parameter or something to specify TP/SL. Something like this maybe (untested/pseudo-code):
It sounds like you’re looking to combine OCO (One Cancels Other) and OSO (One Sends Other) orders in an orderStrategy. This combination allows you to set up a sequence where one order triggers another, but if one order is filled, the other one gets canceled.
To implement this strategy with Tradovate, you would typically need to set up two different orders:
OCO Order: When one order gets filled, the other is automatically canceled.
OSO Order: One order triggers a second order after it is filled.
For example, you could set a stop order, and if the stop order is triggered, it would send a limit order to lock in profit, but if the stop order is canceled or filled, the limit order would be automatically canceled (OCO).
For automating this strategy, pickmytrade could help with the integration between TradingView and Tradovate, as it supports automated execution based on TradingView alerts, which can be linked to both OCO and OSO types of strategies.
You’d be able to set this up through their automation features, ensuring that your trades and strategies are handled seamlessly.