Buffer Query

 

Hello everyone!

           I have a question, can someone tell me? My question is about buffers and arrays and it is: Can Buffers be used in Expert Advisors or just Arrays.
Thank you very much


Manuel

 
Indicators have buffers which automatically shift. Arrays do not automatically do anything. You must do it in EA.

          Array indexing and resizing an AS_SERIES array - MQL4 programming forum #2 (2017)

There are no buffers, no IndicatorCounted() or prev_calculated. No way to know if older bars have changed or been added (history update.)

Just get the value(s) of the indicator(s) into EA/indicator (using iCustom) and do what you want with it.
          (MT4) Detailed explanation of iCustom - MQL4 programming forum (2017)

 
Manuel De Los Heros Soler: I have a question, can someone tell me? My question is about buffers and arrays and it is: Can Buffers be used in Expert Advisors or just Arrays. Thank you very much

EAs do not have the OnCalculate() event handler, so they do not have the concept of "buffers" as used in Custom Indicators.

In all MQL4 programs (Indicators, Expert Advisors, Scripts), you can have arrays be they handled as Series or Non-Series.

 

OKAY!

Thank you very much to both.

 
Manuel De Los Heros Soler #: Thank you very much to both.
For my part, you are welcome!
Reason: