Well the answer is already on your pc. :)
Just place the text cursor on iCustom, press F1 and study the example. Here it is as well.
- www.mql5.com
Well the answer is already on your pc. :)
Just place the text cursor on iCustom, press F1 and study the example. Here it is as well.
Thank you for the reply but the documentation doesn;t answer my questions
I have a few questions regarding when using using multiple custom indicators in the same EA.
1. When having called the two indicators on the OnInit(), will the buffers either be A or B?
2. Can the icustom function only work when placed OnInit() or can you use it in functions?
You can place in functions, I use it and it works.
But its meant to be loaded on Oninit() only once, because its not good idea to load indicator on OnCalculate or OnTimer until its necessary
Sure it does. Firstly you can see where to place iCustom and CopyBuffer!. Secondly, if you then place the cursor on CopyBuffer and press F1 you land in the doc. of CopyBuffer and there you can study the meaning of the parameter with which you call CopyBuffer, one is for the buffer number of the indicator.
As I said everything you need is already on your pc.
- www.mql5.com
Perhaps you should read the manual, especially the examples.
How To Ask Questions The Smart Way. (2004)
How To Interpret Answers.
RTFM and STFW: How To Tell You've Seriously Screwed Up.
They all (including iCustom) return a handle (an int). You get that in OnInit. In OnTick/OnCalculate (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)
How to start with MQL5 - MetaTrader 5 - General - MQL5 programming forum - Page 7 #61 (2020)
MQL5 for Newbies: Guide to Using Technical Indicators in Expert Advisors - MQL5 Articles (2010)
How to call indicators in MQL5 - MQL5 Articles (2010)
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
I have a few questions regarding when using using multiple custom indicators in the same EA.
1. When having called the two indicators on the OnInit(), will the buffers either be A or B?
2. Can the icustom function only work when placed OnInit() or can you use it in functions?