I need calculation but no drawings, is it possible ? (About indicator)

[Deleted]  

Hi all,

I enjoy calling iMA() function to calculate out some variable, like this:

average = iMA(NULL,0,Periods,0,MODE_SMA,PRICE_CLOSE,0);
But whenever my back test terminates, the SMA line automatically displays on the visual chart, although I don't have any drawing statements in my code.

Please tell me a way (if any) to prevent this disturbing autodrawing. Thanks.

 
dahumeovn:

But whenever my back test terminates, the SMA line automatically displays on the visual chart, although I don't have any drawing statements in my code.

Please tell me a way (if any) to prevent this disturbing autodrawing. Thanks.

HideTestIndicators() ?
 
dahumeovn:
But whenever my back test terminates, the SMA line automatically displays on the visual chart, although I don't have any drawing statements in my code.
Please tell me a way (if any) to prevent this disturbing autodrawing. Thanks.
You can use HideTestIndicators but why do you care? It's only when you backtest and only when you stop the test.
[Deleted]  

It 's great ! Thank you, Raptor & WHRoeder

I care about this function because the lines and subwindows are drawn unlimitedly. I only see a dirty window and can not see my last comment.

You should know that in my assignment above, "Periods" is not a fixed number but a variable.

Whenever this var gets a new value, MT4 creates a new SMA line. Consequently, when the test stops I have dozens or hundreds of lines displayed.

Besides, I do not only call iMA() but also iStdDev(), which also use "Periods" as parameter. So then I have lots of subwindows. :-)

Thank you again for your attention.