I want to load my indicator as resource:
It is as described in the help and here: https://www.mql5.com/en/articles/261
Carl it's already second time a link you provided is not correct (error 404), because you added a dot at the end. I fixed both but please pay attention to it.
I want to load my indicator as resource:
It is as described in the help and here: https://www.mql5.com/en/articles/261
And now I get in the Journal:
but in the Expert log:
Of course MyEMA_R.ex5 does exist in \Indicators.
The error is: ERR_INDICATOR_CANNOT_CREATE 4802.
The problem is that in OnInit the check of a valid handle passes (..loaded successfully) while then MyEMA_R.ex5 cannot be created :(
Any idea?
Is it possible to get the indicator to try to reproduce it ?
Sorry about the link - I thought I copied it directly from the address line ...
Hmm, sorry I don't want to send my indicators to others.
I loaded as resource another indicator: Braid Filter.mq5 (found somewhere) and this one worked :(
I added in OnInit() a Print(__LINE__," ",hMA ," OK"); and this shows a valid integer number - so a working handle.
And then in OnTick() the EA fails to get buffer values:
int iVv = CopyBuffer(hMA ,0,tC,2,aMA); if(iVv<1) Print("Dr1 ",__LINE__," Buff0 i:",iVv," err:",err());
This causes this entry in the Expert log:
2023.04.20 16:42:53.316 Dreamer 07 Opti (XAUUSD,H1) Dr7 434 Buff0 i:-1 err:Error Err[4806] ERR_INDICATOR_DATA_NOT_FOUND: Requested data not found
The other indicator Braid Filter.mq5 does not has this problem neither in OnInit() nor with CopyBuffer in OnTick() :(
Of course my indicator works with no errors if directly a) loaded on a chart, b) normally loaded (not as resource) by this or other EAs, and c) used in an optimization.
PS.: I don't use any .dll - if this is of some importance.
Sorry about the link - I thought I copied it directly from the address line ...
Hmm, sorry I don't want to send my indicators to others.
I loaded as resource another indicator: Braid Filter.mq5 (found somewhere) and this one worked :(
I added in OnInit() a Print(__LINE__," ",hMA ," OK"); and this shows a valid integer number - so a working handle.
And then in OnTick() the EA fails to get buffer values:
This causes this entry in the Expert log:
The other indicator Braid Filter.mq5 does not has this problem neither in OnInit() nor with CopyBuffer in OnTick() :(
Of course my indicator works with no errors if directly a) loaded on a chart, b) normally loaded (not as resource) by this or other EAs, and c) used in an optimization.
PS.: I don't use any .dll - if this is of some importance.

- 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 want to load my indicator as resource:
It is as described in the help and here: https://www.mql5.com/en/articles/261
And now I get in the Journal:
but in the Expert log:
Of course MyEMA_R.ex5 does exist in \Indicators.
The error is: ERR_INDICATOR_CANNOT_CREATE 4802.
The problem is that in OnInit the check of a valid handle passes (..loaded successfully) while then MyEMA_R.ex5 cannot be created :(
Any idea?