I am facing a problem with automated trading strategy, when stop loss quantity (lot), that is set using ExitLongStopMarket method, is not updated once partial profit target (that is set using ExitLongLimit method) is filled.
The strategy works as follows:
1. Upon some predefined conditions it enters long position using EnterLong method with quantity = 3
2. In OnExecutionUpdate method once Long trade is executed, it sets stop loss and profit target using ExitLongStopMarket and ExitLongLimit. For ExitLongStopMarket quantity it uses 3, for ExitLongLimit it uses quantity 2.
3. As I understand, on Profit Target execution, the strategy should automatically update Stop Loss quantity to remained amount of lots (to 1) since Managed Approach is used. However, this doesn't happen, and when stop loss is filled, it is filled with quantity = 3 and position becomes 2 short, instead of being flat.
Is there anything I am missing with using ExitLongStopMarket and ExitLongLimit methods?
Best regards,
Alexei
Comment