I would like to ask for help with programing of exit orders ExitStopLimit and ExitStopLoss, I have programmed simple strategy, but when i run it in chart, i realized it does not work properly
In my strategy i placed EnterLongStop order
entryOrderLong = EnterLongStop(0, false, 1, High[0] + 1 * TickSize, "LONG");
exitLimitLong = ExitLongLimit(0, true, 1, entryOrderLong.AvgFillPrice + 100 * TickSize, "PROFIT TARGET",entryOrderLong.FromEntrySignal);
exitStopLong = ExitLongStop(0, true, 1, entryOrderLong.AvgFillPrice - 100 * TickSize, "STOP LOSS", entryOrderLong.FromEntrySignal);
Confusing is that sometimes exitorders works, but sometimes do not work :s I have attached image of this issue in chart.
Is there any mistake in my code? Could somebody help pls?
Thank you
Filip

Comment