I'm developing a strategy that is looking to catch large intraday moves. When entering a trade, I have a SetStopLoss at a reasonable level and a goal price with SetProfitTarget (typically, many points away). After the trade moves enough in my favor, I would like cancel the SetStopLoss and then use SetTrailStop so that some profits are locked in but still allow the trade to "breathe" to make larger profit moves.
I'm not seeing any means to do this. The CancelOrder routine needs an order but the SetStopLoss routine doesn't return any Order object.
If I'm understanding correctly and am able to cancel the SetStopLoss order, I would need to do the following:
- Cancel SetStopLoss order
- NOTE: Because of the OCO connection, the SetTargetPrice order is automatically cancelled, too.
- Call SetTrailStop AND call SetTargetPrice at the same level I had before.
SetStopLoss(string fromEntrySignal, CalculationMode mode, double value, bool isSimulatedStop)
SetProfitTarget(string fromEntrySignal, CalculationMode mode, double value, bool isMIT)
Is this possible?
Thanks!
Matt
Comment