could you please have a look at the following issue. It's kind of common problem.
Strategy based on 90-min chart:
-------------------------------
protected override void Initialize()
{
SetStopLoss(CalculationMode.Ticks, StopLoss);
CalculateOnBarClose = true;
}
protected override void OnBarUpdate()
{
if (Bars.BarsSinceSession == TriggerBar - 1)
{
if (SMA(Fast)[0] > SMA(Slow)[0])
EnterLongStop(High[0] + TickSize,"Long stop");
}
}
The problem:
------------
Assumption: On the next 90-min bar the EnterLongStop() is hit and that bar exceeds the stop loss limit too.
In this case the stop loss order is executed anyway during backtest. But not necessarily in reality (1-min chart) depending on whether the stop loss trigger event occures before or after the EnterLongStop().
What is best practice to work around this problem?
Regards
Ralph
Comment