Greetings all. I’m really confused as to what I’m doing wrong or if its a glitch. When you add ‘crosses over’ or the alternative method of using > and < in the code, the trades are not being executed in the backtest. Part of the code is that there is an initial rise in the weekly candle (2 weeks ago) – for this I used a crossover of two ATR values. Its essentially pullback system.
Using multitimeframe – 1 week with daily as default
The trade does get executed if you take the above and remove the last bit ‘and (atr2[3]<atr15[3])’ – I have no idea why. But I need a ‘crosses over’ system rather than just being above the value
Because you are checking the conditions in the daily time frame you are checking them two days back and not two weeks back. Move it to the weekly timeframe to check two weeks back.