Perhaps you should read the manual, especially the examples. They all (including iCustom) return a handle (an int.) You get that in OnInit. In OnTick (after the indicator has updated its buffers,) you use the handle, shift and count to get the data.
Technical Indicators - Reference on algorithmic/automated trading language for MetaTrader 5
Timeseries and Indicators Access / CopyBuffer - Reference on algorithmic/automated trading language for MetaTrader 5
How to start with MQL5 - General - MQL5 programming forum - Page 3 #22 2020.03.08
How to call indicators in MQL5 - MQL5 Articles 12 March 2010
Technical Indicators - Reference on algorithmic/automated trading language for MetaTrader 5
Timeseries and Indicators Access / CopyBuffer - Reference on algorithmic/automated trading language for MetaTrader 5
How to start with MQL5 - General - MQL5 programming forum - Page 3 #22 2020.03.08
How to call indicators in MQL5 - MQL5 Articles 12 March 2010
Leo:
I've developed an Expert Advisor and calling a custom indicator using the iCustom function.
The indicator name is: (ROC) https://www.mql5.com/en/code/46
When I start the Tester it just keep repeating itself and I don't know why.
Here where I call it:
I've attached an image to show what's happening here.
Any thoughts?
I've developed an Expert Advisor and calling a custom indicator using the iCustom function.
The indicator name is: (ROC) https://www.mql5.com/en/code/46
When I start the Tester it just keep repeating itself and I don't know why.
Here where I call it:
I've attached an image to show what's happening here.
Any thoughts?
Forum on trading, automated trading systems and testing trading strategies
Custom indicator and printing function to chart
Vladimir Karputov, 2020.06.19 04:45
Read help: iCustom
Please note: in MQL5, the indicator handle is created once (in OnInit). Then, to obtain the values, use CopyBuffer
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
The indicator name is: (ROC) https://www.mql5.com/en/code/46
When I start the Tester it just keep repeating itself and I don't know why.
Here where I call it:
I've attached an image to show what's happening here.
Any thoughts?