How to determine if your indicator is a repainter - 2 easy methods - page 2

 
techmac:
I test repainting a bit differently : place it on chart, let it run, then go to parameters, simply press OK and if it changed after that compared to what I saw before pressing OK, it is a repainter

Not a bad way either

 
mladen:
Not a bad way either

Yes, because repainters will change past values only when you change parameters, time frame or symbols - I find that it is easiest just to simulate parameters change - the change is very easy to see then

 
techmac:
I test repainting a bit differently : place it on chart, let it run, then go to parameters, simply press OK and if it changed after that compared to what I saw before pressing OK, it is a repainter

That's a good method as well, thanks for sharing.

 
The most simple way is to open a M1 chart of e.g. eur/usd, in the navigator go to Indicators, Trend, Moving Average, then don't double-click it, but drag the icon -the yellow rectangle with an f-, or the words "Moving Average" right of it, into the window of the indicator you want to test: Period = 1, Shift = 0, Ma Method = Simple, Apply to = First Indicator's Data, and then select whatever graphics you want. This will be the same as end-pointing it in real-time, without having to write Mladen-level mq4/5 code... You just save the indicator value at the closing of the bar. After you have a sufficient amount of bars (run the chart minimized while you're doing other work), after a while you will see if the indicator's line and the SMA(indicator,1) coincide (= causal) or not (=acausal / a "repainter").

You can also use a visual mode backtest with an empty EA if you lack the patience, although sometimes this can update even SMA(1,indicator) past values.