Indicator show different between live chart and backtest

ezraluandre

Trader
Jun 17, 2020
23
1
19
29
Hi everyone I have an indicator that I want to use in my EA. This indicator should not be repainting, but I found some problem when using it in backtesting.
Here's screenshot on real chart,
chart.PNG
and here's screenshot from backtesting,
chart backtest.PNG
The indicator looks slightly different and if we look at the timestamped (red line) it give different result when indicator change direction. The difference looked like an hour in the picture but it keeps increasing further as the backtest goes. Anyone has an Idea why this behavior occurred and if there's a way to fix this problem?
 

Enivid

Administrator
Staff member
Nov 30, 2008
17,114
1,045
144
Odessa
www.earnforex.com
It's probably coded poorly, so when it draws the most recent bars (backtesting) it calculates everything differently from when it calculates everything at once when you just load it. Anyway, it's impossible to tell without seeing its source code.
 

Alpha24

Trader
Jun 25, 2022
8
0
7
solar winds indicator is repainting (recalculating) indicator. so many of signals are false. use it with other non repainting indicators.
 

ezraluandre

Trader
Jun 17, 2020
23
1
19
29
Thanks enivid and alpha24 for your answer, I thought that solar winds isn't repainting.

Aside from repainting, if the indicator is coded poorly can it still be used in real chart?