For example:
- During the evolution of a trade a stop loss order, "stopOrder", is updated to trail price activity.
- Where the position must be partially closed in the lead up to Initial Margin prior to session close.
- The "maxQuanty" is the maximum quantity within margin constraints, and "excessQuantity" is the quantity to be closed at market.
Should the partial close be implemented as:
1) "stopOrder" used to facilitate both
a) the partial close at market and
b) update quantity to monitor the evolving trade
stopOrder = ExitLong(EntryBarsArray, excessQuantity, signalName, fromEntrySignal); stopOrder = ExitLongStopMarket(EntryBarsArray, isLiveUntilCancelled, maxQuantity, stopPrice, signalName, fromEntrySignal);
a) create a new Order, "onceOffOrder", to partially close
b) update "stopOrder" to monitor the evolving trade
onceOffOrder = ExitLong(EntryBarsArray, excessQuantity, signalName, fromEntrySignal); stopOrder = ExitLongStopMarket(EntryBarsArray, isLiveUntilCancelled, maxQuantity, stopPrice, signalName, fromEntrySignal);
Comment