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:

Abiroid_Repaint_Check_v1.0.rar (251 downloads)

You may also like...

2 Responses

  1. Bruce says:

    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”

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

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

Leave a Reply

Your email address will not be published. Required fields are marked *

%d bloggers like this: