ChangeOrder(stopOrder, stopOrder.Quantity-1, 0, Position.AveragePrice);
2. My target orders were working fine until I added some logic in OnExecutionUpdate to use SetParabolicStop as follows:
if(useTrailStop) // set as a boolean parameter at startup
else stopOrder = ExitShortStopMarket(0, true, execution.Order.Filled, execution.Order.AverageFillPrice + stopLoss * TickSize, "SS", "SE");
if (!tpSet){
tpSet = true; // only set 1 takeProfit order. Second one moved to BE and trailed
chasePrice = execution.Order.AverageFillPrice - takeProfit * TickSize;
}
... Suddenly target orders are not being set any longer. Logs show they are being submitted but I'm not seeing any news on why they're not being accepted. Documentation says one can't combine stop orders and parabolic orders for the same position but I wouldn't think that also refers to target orders, does it?
3. In the logs, the Parabolic Stops are working fine but the insist on not being MarketifTouched. See image from log. Does not matter if they are simulated stops or not.
Many thanks for your time.
Mark
Comment