When I use it for exiting 1 contract per line inside the onExecuteUpdate(), as shown below
protected override void OnExecutionUpdate(Execution execution, string executionId, double price, int quantity, MarketPosition marketPosition, string orderId, DateTime time) { if(longEntryOrder != null && execution.Order == longEntryOrder) { ExitLongLimit(CurrentBar, true, 1, FirstTargetLine, "LX1", "BL"); }...
I want to know how can I partially exit 4 contracts at four different prices?
Inside the onBarUpdate method I entered into the long position with 5 contract, as shown in the code below
longEntryOrder = EnterLongLimit(5, LongLimitPrice, "BL");
Comment