I am trying to create original EA with MQL5, but iCustom function returns always 10.0.
Code :
Alert(MA1);
If I delete Custom Moving Average.ex5,iCustom always returns value of -1.0.
so, Custom Moving Average.ex5 seems to be read correctly.
iCustom uses an integer and returns the handle for processing not an indicator value, have a look here
https://www.mql5.com/en/docs/indicators/icustom
regards
- www.mql5.com
I am trying to create original EA with MQL5, but iCustom function returns always 10.0.
Code :
Alert(MA1);
If I delete Custom Moving Average.ex5,iCustom always returns value of -1.0.
so, Custom Moving Average.ex5 seems to be read correctly.
In MQL5, the indicator handle must be CREATED ONCE (in OnInit), and then (to obtain data) use CopyBuffer.
Example: iCustom
- www.mql5.com
In MQL5, the indicator handle must be CREATED ONCE (in OnInit), and then (to obtain data) use CopyBuffer.
Example: iCustom
Thanks to Vladimir Karputov and Paul Anscombe, I've resovled this problem.
Thank you very much!!
- www.mql5.com
- 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 am trying to create original EA with MQL5, but iCustom function returns always 10.0.
Code :
double MA1 = iCustom("USDJPY",PERIOD_CURRENT,"Examples\\Custom Moving Average");Alert(MA1);
If I delete Custom Moving Average.ex5,iCustom always returns value of -1.0.
so, Custom Moving Average.ex5 seems to be read correctly.