My strategy did an EnterShort on YM, and got a (simulated) fill at 12630. I then wanted to place bracket orders for profit target and stop loss. Once the position was filled (Position.Quantity != 0), I did ExitShortStopLimit(12550, 12750). I got an error message saying that limit price has to be greater than stop price! That is true on a long position, but this was a short position.
How do I place bracket orders? (I don't want to use SetStopLoss() and SetProfitTarget(), because the offsets change for each order, but I want the same type of dual exit strategy, with one canceling the other).
For example, before I place the order, I know that whether I get filled at 12700, 12705 or 12695, I want my limit to be 12650 and my stop to be 12750. That's all I want to accomplish, and that's why I can't use SetStopLoss and SetProfitTarget, because they are relative to the fill price.
Thanks
Comment