adaptar código MQL5 a MQL4

To add comments, please log in or register
lina_2016
16
lina_2016  

Hello, I need to know what functions of MQL4, I could use to perform the same task as BarsCalculated and CopyBuffer of MQL5

Thank you

Fernando Carreiro
4263
Fernando Carreiro  
lina_2016: Hello, I need to know what functions of MQL4, I could use to perform the same task as BarsCalculated and CopyBuffer of MQL5

They don't exist in MQL4 because the iCustom() function is implemented differently in MQL4 compared to MQL5. In MQL4, you use the iCustom() function to directly return the "buffer" data, one by one, based on a bar shift/index.

iCustom - Technical Indicators - MQL4 Reference
iCustom - Technical Indicators - MQL4 Reference
  • docs.mql4.com
[in]  Custom indicator compiled program name, relative to the root indicators directory (MQL4/Indicators/). If the indicator is located in subdirectory, for example, in MQL4/Indicators/ The passed parameters and their order must correspond with the declaration order and the type of extern variables of the custom indicator...
lina_2016
16
lina_2016  
Fernando Carreiro:

They don't exist in MQL4 because the iCustom() function is implemented differently in MQL4 compared to MQL5. In MQL4, you use the iCustom() function to directly return the "buffer" data, one by one, based on a bar shift/index.


Thank you very much for your quick response

To add comments, please log in or register