Download MetaTrader 5

Remove All Indicators

To add comments, please log in or register
Henrique Vilela
1276
Henrique Vilela  

Hi,

There's a way to iterate over all indicators to remove them all?

Thanks. 

Henrique Vilela
1276
Henrique Vilela  

I've reached this solution, if anyone is interested.

      int subwindows=ChartGetInteger(0,CHART_WINDOWS_TOTAL);

      for(int i=subwindows;i>=0;i--)
        {
         int indicators=ChartIndicatorsTotal(0,i);

         for(int j=indicators-1; j>=0; j--)
           {
            ChartIndicatorDelete(0,i,ChartIndicatorName(0,i,j));
           }
        }
bekdemir06
7
bekdemir06  
Henrique Vilela:

I've reached this solution, if anyone is interested.

how can we youse this..

Henrique Vilela
1276
Henrique Vilela  
bekdemir06:

how can we youse this..

I'm using it to clean up the chart when my EA is started.
Diane Minshew
351
Diane Minshew  
Henrique Vilela:
I'm using it to clean up the chart when my EA is started.

Thank you its perfect for my needs i was just about start working on the same tool.

Rael Schweitzer
10
Rael Schweitzer  
Obrigado Henrique!
To add comments, please log in or register