-
Please edit your (original) post and use the CODE button (or Alt+S)! (For large amounts of code, attach it.)
General rules and best pratices of the Forum. - General - MQL5 programming forum #25 (2019)
Messages Editor
Forum rules and recommendations - General - MQL5 programming forum (2023) -
iCustom/CopyBuffer, only reads buffers. It can not call functions. If those two indicator values are not put in buffers, you can't read them from the File A.
-
Read the indicators directly.
You are basically passing wrong parameters type, you maybe used wrong variable types, or wrong order. Check it.
@Fabio Cavalloni
Thank you for the answer..
I was able to fix the issue now all is working as expected

- www.mql5.com
-
Please edit your (original) post and use the CODE button (or Alt+S)! (For large amounts of code, attach it.)
General rules and best pratices of the Forum. - General - MQL5 programming forum #25 (2019)
Messages Editor
Forum rules and recommendations - General - MQL5 programming forum (2023) -
iCustom/CopyBuffer, only reads buffers. It can not call functions. If those two indicator values are not put in buffers, you can't read them from the File A.
-
Read the indicators directly.
Thank you for the answer.
Ill try to remember for the next post since I cant edit it now anymore.
There is only a few min. timespan to edit post.
Hi
I would like to ask some help with the iCustom function
I have file A so to speak and file A has these 2 indicators
In File 2 I want to call both of these using
EMA13A_initial = iCustom(_Symbol,TimeFrame,"Elder Impulse system", TimeFrame, EMAPERIOD, 0, EMAMODELT, PriceType);
//Print("MA_handle = ",EMA13A_initial," error = ",GetLastError());
MACDA_initial = iCustom(_Symbol, TimeFrame,"Elder Impulse system", TimeFrame, FASTEMA, SLOWEMA, MACDESMA, PriceType1);
if I comment out the MACDA line all is fine
As soon as I uncomment the MACDA line I get error "cannot load indicator 'Moving Average' [4002]"
I double check the parameters and all seems to be fine.
Anyone know if its possible to use two iCustom function to call two function in the same file (A)?
Kind regards
You can also try to use it like this, if you need to use multiple custom indicators in a file, you'll need to ensure that each iCustom call corresponds to a separate custom indicator. From your code, it looks like you're trying to call two different custom indicators ( Elder Impulse system and Moving Average Convergence Divergence (MACD) ).
EMA13A_initial = iCustom(_Symbol, TimeFrame, "Elder Impulse system", EMAPERIOD, 0, EMAMODELT, PriceType);
MACDA_initial = iCustom(_Symbol, TimeFrame, "MACD", FASTEMA, SLOWEMA, MACDESMA, PriceType1);

- 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 would like to ask some help with the iCustom function
I have file A so to speak and file A has these 2 indicators
In File 2 I want to call both of these using
EMA13A_initial = iCustom(_Symbol,TimeFrame,"Elder Impulse system", TimeFrame, EMAPERIOD, 0, EMAMODELT, PriceType);
//Print("MA_handle = ",EMA13A_initial," error = ",GetLastError());
MACDA_initial = iCustom(_Symbol, TimeFrame,"Elder Impulse system", TimeFrame, FASTEMA, SLOWEMA, MACDESMA, PriceType1);
if I comment out the MACDA line all is fine
As soon as I uncomment the MACDA line I get error "cannot load indicator 'Moving Average' [4002]"
I double check the parameters and all seems to be fine.
Anyone know if its possible to use two iCustom function to call two function in the same file (A)?
Kind regards