MQL4: How to find if an Indicator Repaints

Repainting Indicators: A Big Problem

Sometimes when we see the final result of an indicator it appears too good to be true. Simply amazing that it could predict so well. But when we use it in real-time, we realize that the indicator massively repaints. So, we should have a way of finding it out beforehand, so we don’t use the indicator’s results on our real accounts.

This post shows how to find a repainting Arrow Indicator. But the same logic can be applied to other types of indicators. I have taken the Binary Viper Indicator as an example and used a wrapper indicator to check how much it repaints.

How does the Wrapper work?

It’s very simple. Wrapper Indicator just fills the buffer values and draws the arrows as they appear on original indicator. And it does not change the arrows even if the original indicator deletes them. As you can see in this image, the yellow arrows show everytime BinaryViper redraws the arrows and the Red Arrow is the final Down arrow in BinaryViper.

As you can see, it repainted 15 times before settling on a final down arrow (red).

How to Use:

To use the wrapper on your own arrow indicator just replace this code with your own indicator name:

double arrow_up = iCustom(NULL, 0, "Binary Viper v2.00", 0,i);
double arrow_down = iCustom(NULL, 0, "Binary Viper v2.00", 1,i);

Just use it with an empty expert advisor to see the results quickly.

Downloads:

You may also like...

0 0 votes
Article Rating
Subscribe
Notify of
5 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
Bruce
Bruce
5 years ago

Nice post. But many indicators repaint “current bar”. Can you add another option to show only repaint arrows if an indicator changes for “previous bars”

Avery Horton
3 years ago

There’s a huge difference between repainting and updating in real time!!

https://www.kreslik.com/forums/therumpledone/repaint-this-t1686

Cip
Cip
Reply to  Avery Horton
2 years ago

It really does not matter if you name it ” repainting”, “updating in real time”, recalculating. It is misleading and it is a marketing tactic that is a big lie. So this post is valid in all aspects.

5
0
Would love your thoughts, please comment.x
()
x