[Discussion] The "Grail" Illusion: How to properly detect Repainting Indicators before you trade

 

Hi everyone.

As an MQL5 developer, I frequently analyze technical specifications where clients ask to automate a strategy based on a specific indicator. Often, I have to deliver bad news: the indicator is "repainting" (cheating), and the beautiful history on the chart is just an illusion.

I decided to start this thread to help traders save time and money. Here is a simple checklist on how to test any tool before you pay for development or launch it on a real account.

1. The "Visual Mode" Stress Test Never trust a static screenshot.

  • Open the Strategy Tester in MT5.

  • Select the indicator you want to check.

  • Check the box "Visual mode with the display of charts".

  • Crucial Step: Set the speed to slow and watch closely how the signal forms. Does the arrow appear, disappear, and then appear again 3 bars later? If yes — it's a repainter.

2. The "Data Window" Check Sometimes indicators don't draw arrows but change buffer values invisible to the naked eye.

  • Press Ctrl+D to open the Data Window.

  • Hover your mouse over a past signal candle.

  • Move the mouse to the next candle. If the values of the previous candle change when the new candle forms — the logic is flawed (it is "looking into the future").


For Developers & Learners: The most common code error causing this is incorrect loop limits.

Incorrect (Recalculates everything every tick):

for(int i=0; i<rates_total; i++)


{
   // Logic here
}


Correct (Only calculates new data):

int limit = rates_total - prev_calculated;
// Logic here



Let's discuss: What was the most deceptive indicator you've ever encountered?

If you have a suspicious indicator and aren't sure if it repaints, feel free to attach it here (or send a screenshot), and we can analyze the logic together.

The Fundamentals of Testing in MetaTrader 5
The Fundamentals of Testing in MetaTrader 5
  • 2011.05.18
  • www.mql5.com
What are the differences between the three modes of testing in MetaTrader 5, and what should be particularly looked for? How does the testing of an EA, trading simultaneously on multiple instruments, take place? When and how are the indicator values calculated during testing, and how are the events handled? How to synchronize the bars from different instruments during testing in an "open prices only" mode? This article aims to provide answers to these and many other questions.
 
Kemran Feitulov:

Hi everyone.

As an MQL5 developer, I frequently analyze technical specifications where clients ask to automate a strategy based on a specific indicator. Often, I have to deliver bad news: the indicator is "repainting" (cheating), and the beautiful history on the chart is just an illusion.

I decided to start this thread to help traders save time and money. Here is a simple checklist on how to test any tool before you pay for development or launch it on a real account.

1. The "Visual Mode" Stress Test Never trust a static screenshot.

  • Open the Strategy Tester in MT5.

  • Select the indicator you want to check.

  • Check the box "Visual mode with the display of charts".

  • Crucial Step: Set the speed to slow and watch closely how the signal forms. Does the arrow appear, disappear, and then appear again 3 bars later? If yes — it's a repainter.

2. The "Data Window" Check Sometimes indicators don't draw arrows but change buffer values invisible to the naked eye.

  • Press Ctrl+D to open the Data Window.

  • Hover your mouse over a past signal candle.

  • Move the mouse to the next candle. If the values of the previous candle change when the new candle forms — the logic is flawed (it is "looking into the future").


For Developers & Learners: The most common code error causing this is incorrect loop limits.

Incorrect (Recalculates everything every tick):

for(int i=0; i<rates_total; i++)


{
   // Logic here
}


Correct (Only calculates new data):

int limit = rates_total - prev_calculated;
// Logic here



Let's discuss: What was the most deceptive indicator you've ever encountered?

If you have a suspicious indicator and aren't sure if it repaints, feel free to attach it here (or send a screenshot), and we can analyze the logic together.

Useful overview - thanks for sharing.

Just a reminder: the Forum is for technical discussion, not for offering free analysis services. Inviting users to attach indicators for review can quickly turn a thread into a support queue, which we try to avoid.