Simple modify the indicator code to not use graphical objects and use buffers instead.
You will not be able to optimise or do non-visual back-tests with graphical objects anyway, so use buffers instead.
Hello,
In my MQL5 Expert Advisor I use iMA function to create Movie averages needed for logic. These MA lines are plotted using ObjectCreate() function using price and time values data generated with iMA. When I try to Backtest this EA in Visual Mode on Strategy tester these lines automatically show up on charts. I tried to use ObjectDelete() function as well I tried to disable function that draws these line by using appropriate flag in Tester Mode but still these lines show up on Tester as soon I start BackTesting.
I would appreciate if someone suggest me on how to suppress / remove these line during MT5 Backtesting in Visual mode?
I am attaching the Chart screen shot where there are other lines other than drawn by iMA.
...as well I tried to disable function that draws these line by using appropriate flag in Tester Mode but still these lines show up on Tester as soon I start BackTesting.
It is not entirely clear from your post if you've tried it or not-
Add the following to the top of your OnInit() function-
TesterHideIndicators(true);
Three people answered. Each one of us interpreted the query differently. Only the last answer was the correct solution.
It proves that if you don't state your issue clearly, properly and in detail, you can easily get misunderstood and get an incorrect response.

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hello,
In my MQL5 Expert Advisor I use iMA function to create Movie averages needed for logic. These MA lines are plotted using ObjectCreate() function using price and time values data generated with iMA. When I try to Backtest this EA in Visual Mode on Strategy tester these lines automatically show up on charts. I tried to use ObjectDelete() function as well I tried to disable function that draws these line by using appropriate flag in Tester Mode but still these lines show up on Tester as soon I start BackTesting.
I would appreciate if someone suggest me on how to suppress / remove these line during MT5 Backtesting in Visual mode?
I am attaching the Chart screen shot where there are other lines other than drawn by iMA.