I am placing a ExitShortStopMarket and ExitShortLimit, after the order is executed.
The below Code is called in the OnExecutionUpdate after the Short position is created. I can see the entry for the message written to log, however the exit orders are not placed.
This is done for Historical data.
dShortStopPrice = dEntryPrice + (StopTargetTicks/ Instrument.MasterInstrument.PointValue);
WriteToLog(" Setting Short Stop Price at " + dShortStopPrice);
ExitShortStopMarket(dShortStopPrice,ShortStop,Sell Short);
dShortTargetPrice = dEntryPrice - (ProfitTargetTicks/ Instrument.MasterInstrument.PointValue);
WriteToLog(" Setting Short Target Price at " + dShortTargetPrice);
ExitShortLimit(dShortTargetPrice,CoverShort,SellSh ort);
Comment