How many buffers each indicator needs

 

Is there an article or some documentation which says how many buffers each indicator needs ?  I am also wondering how if I create an indicator, how would the EA communicate with it ? As well as, if there are functions that correspond to the #property directives so I can do this dynamically in code, and just have a generic one but it seems there are no corresponding functions and no way for the EA to communicate with the Indicator.  If I define the buffers in the indicator itself there is no way to get to them or communicate with the same class the EA instantiated (similar to a static class) . But it would run into issues as I would need one per symbol.

Sorry if I missed something.

Is there a way to pass a class to the indicator ? They seem separate. I saw one example with the ZigZag but they each had their own instance of the class.  

Also I have a question about the 3 types of OnCalculate, and can you define multiple ? Otherwise you get high low data but no price data.   

I really want the EA to get the Tick data, and pass it to the indicator or something similar, so the calculations are in sync. It seemed the only way was to have the buffers in the EA, and call CopyBuffer when appropriate.

I'll leave the multi timeframes issues until later, I saw the one sample but wasn't sure what to do if you don't know the timeframes in advance and which is primary ? Or if you had 3 to deal with.

Documentation on MQL5: Timeseries and Indicators Access / CopyBuffer
Documentation on MQL5: Timeseries and Indicators Access / CopyBuffer
  • www.mql5.com
Timeseries and Indicators Access / CopyBuffer - Documentation on MQL5
 
mac8008:

Is there an article or some documentation which says how many buffers each indicator needs ?  I am also wondering how if I create an indicator, how would the EA communicate with it ? As well as, if there are functions that correspond to the #property directives so I can do this dynamically in code, and just have a generic one but it seems there are no corresponding functions and no way for the EA to communicate with the Indicator.  If I define the buffers in the indicator itself there is no way to get to them or communicate with the same class the EA instantiated (similar to a static class) . But it would run into issues as I would need one per symbol.

...

Many questions. To begin you can read this article. Then if you want to know evrything about indicators, use this as a reference.

After that if you have still questions, you come back here to ask ;-)

 
mac8008:

Is there an article or some documentation which says how many buffers each indicator needs ?  I am also wondering how if I create an indicator, how would the EA communicate with it ? As well as, if there are functions that correspond to the #property directives so I can do this dynamically in code, and just have a generic one but it seems there are no corresponding functions and no way for the EA to communicate with the Indicator.  If I define the buffers in the indicator itself there is no way to get to them or communicate with the same class the EA instantiated (similar to a static class) . But it would run into issues as I would need one per symbol.

Sorry if I missed something.

Is there a way to pass a class to the indicator ? They seem separate. I saw one example with the ZigZag but they each had their own instance of the class.  

Also I have a question about the 3 types of OnCalculate, and can you define multiple ? Otherwise you get high low data but no price data.   

I really want the EA to get the Tick data, and pass it to the indicator or something similar, so the calculations are in sync. It seemed the only way was to have the buffers in the EA, and call CopyBuffer when appropriate.

I'll leave the multi timeframes issues until later, I saw the one sample but wasn't sure what to do if you don't know the timeframes in advance and which is primary ? Or if you had 3 to deal with.

 

ionocean:
 This is my first post on the Forum, hope this is ok...

  I scrolled all the way back to the first article posts, and found (I think) what you are looking for.  Look in Article 31, it has SIMPLE code examples of the Standard Indicators.  I found it today, and it helped a lot!!!  Mike K.