Download MetaTrader 5

Help: How to make 1 indicator query another's data?

To add comments, please log in or register
Do you have Mac OS? Find out how to install MetaTrader on it!
Xennon
86
Xennon 2016.06.05 16:01 

I'm trying to write a indicator that makes use of another's data.  The indicator I want to query is a Heiken Ashi indicator and I want to determine what type of bar it's painting at any given point along the chart. 

Looking through the code of the H/A indicator, I can see how to determine this information but my problem is how do I pass it back to another indicator when it needs it?

So - as my indicator parses over each bar in the chart, I'd like to query the H/A indicator so it can tell me what type of bar it's paining - an UP or a DOWN bar so I can detect when it changes and take specific action.


Does anyone have any suggestions as to how I might do this?


Any help appreciated.

Sarotphan Kanlamphu
644
Sarotphan Kanlamphu 2016.06.12 12:30  
Xennon:

I'm trying to write a indicator that makes use of another's data.  The indicator I want to query is a Heiken Ashi indicator and I want to determine what type of bar it's painting at any given point along the chart. 

Looking through the code of the H/A indicator, I can see how to determine this information but my problem is how do I pass it back to another indicator when it needs it?

So - as my indicator parses over each bar in the chart, I'd like to query the H/A indicator so it can tell me what type of bar it's paining - an UP or a DOWN bar so I can detect when it changes and take specific action.


Does anyone have any suggestions as to how I might do this?


Any help appreciated.

I just start write some indicator recently (last week, exactly).
For your matter, this is what I done to pass value between indicator

on 1st indicator, I set text value into one (Hidden) Label,  say lblData
on 2nd indicator, I read the value of that object --> ObjectGetString(0, "lblData", OBJPROP_TEXT)

P.S. I don't know about separate windows indicator, but indicator on chart, seem object can shared between indicator.

Kaleem Haider
74399
Kaleem Haider 2016.06.12 22:57  
Xennon:

I'm trying to write a indicator that makes use of another's data.  The indicator I want to query is a Heiken Ashi indicator and I want to determine what type of bar it's painting at any given point along the chart. 

Looking through the code of the H/A indicator, I can see how to determine this information but my problem is how do I pass it back to another indicator when it needs it?

So - as my indicator parses over each bar in the chart, I'd like to query the H/A indicator so it can tell me what type of bar it's paining - an UP or a DOWN bar so I can detect when it changes and take specific action.


Does anyone have any suggestions as to how I might do this?


Any help appreciated.

Use iCustom(
To add comments, please log in or register