Download MetaTrader 5

Loading Existing Indicator Data from chart

To add comments, please log in or register
NickMikh
8
NickMikh 2011.09.08 02:04 

Hi everyone,

        I have a question about working with existing indicators on a chart. I am trying to write a script

that has access to the indicators attached to the current chart. They show up when I run ChartIndicatorsTotal()

but when I cannot get the handles for them. Any ideas? Thanks in advance.

Alexey Da
Moderator
6651
Alexey Da 2011.09.08 10:11  
You should create in your script a handle to preferred indicator with the same parameters.
NickMikh
8
NickMikh 2011.09.08 11:09  
alexvd:
You should create in your script a handle to preferred indicator with the same parameters.

So, you mean there is no way to just get the handle. As I understand if I create the same indicator with the same parameters it will link to the one in the chart, but I wanted to avoid manually creating the indicator in the code. Ideally I wanted to just instantiate a bunch of indicators in the chart, set up their parameters and then simply launch my script to dump all of that data into a file. There is no way to avoid setting up the indicators in the code, am I correct?

Thanks,

     Nick

Alexey Da
Moderator
6651
Alexey Da 2011.09.08 12:25  
NickMikh:

There is no way to avoid setting up the indicators in the code, am I correct?

You are right, unfortunately there isn't.

To add comments, please log in or register