Download MetaTrader 5
To add comments, please log in or register
Find out how to install MetaTrader on Linux
cyberglassed
611
cyberglassed 2014.05.09 04:49 

Hello, I would like to know how to get with mql5 a list of all indicators attached to the chart?,

and then get the properties of those indicators?


Regards, Cyberglassed.

Vladimir Karputov
Moderator
37558
Vladimir Karputov 2014.05.09 04:54  
cyberglassed:

Hello, I would like to know how to get with mql5 a list of all indicators attached to the chart?...

Documentation on MQL5: Chart Operations / ChartIndicatorsTotal
Documentation on MQL5: Chart Operations / ChartIndicatorsTotal
  • www.mql5.com
Chart Operations / ChartIndicatorsTotal - Documentation on MQL5
cyberglassed
611
cyberglassed 2014.05.09 06:22  
barabashkakvn:

I have the following code inside an script:

void OnStart() {
        int num_windows = (int)ChartGetInteger(0, CHART_WINDOWS_TOTAL);
        printf("num_windows: %d", num_windows);

        for (int i = 0; i < num_windows; i++) {
                for (int j = 0; j < ChartIndicatorsTotal(0, i); j++) {
                        string name = ChartIndicatorName(0, i, j);
                        printf("window index: %d, chart index: %d, name: %s", i, j, name);
                }
        }
        
}

which currently list all the indicators in all subwindows in the main chart.

But I would like to get the last value of each buffer of each of them. Then, I need some function to retrieve this data but I cannot find it.


Regards.

cyberglassed
611
cyberglassed 2014.05.09 06:39  
cyberglassed:

I have the following code inside an script:

which currently list all the indicators in all subwindows in the main chart.

But I would like to get the last value of each buffer of each of them. Then, I need some function to retrieve this data but I cannot find it.


Regards.

I found it.

I have to use: ChartIndicatorGet()


Thanks!

/
To add comments, please log in or register