Backtest Trade entry exit lagging on daily chart?
Hey there coders…
I am seeing a delay in the triggered trade entry / exit logic vs the actual entry or exit…. see attached.
You can see on the attached as the vertical line is aligned to the entry/exit logic (crossing), and the actual entry on the price chart is the next bar!
Using BARINDEX reduced the lag from 2 bars to 1 bar!!!
I wonder if this is the norm, when using a daily chart, or the code needs tweaking ?
Code attached in txt file…
As always, all comments welcome 🙂
NT
BTW: stop loss issues resolved. See 3 panel (Variables) aligns with entry exit types, happy days 🙂