Has anyone recently encountered again this error: Err[4802] ERR_INDICATOR_CANNOT_CREATE: Indicator cannot be created
and would be able to give a hint how to defeat it?
I have built an indicator that runs on all symbols and timeframes since quite a while! But now when I want to load it in OnInit() in my EA the
error 4802 appears, unfortunately without any hint where to start to do something about it :(
I (Win 10, MT5, b.3580) have checked, deleted and again wrote the indicator under a new name in \MQL5\Indicators\ (where two others are saved and loaded by my EA without problem).
My indicator does not have/need resources nor other indicators with the same or different timeframes.
The EA runs in the same timeframe as the indicator.
I have read https://www.mql5.com/en/forum/357491 where he deleted the project file - I have no project just my indicator(s) in \MQL5\Indicators\ and the EA in \MQL5\Experts\
I havenot encountered it , but ,the first thing i would try is move the creation on timer , then kill the timer .
A timer - where? In the EA or in the indicator?
Here it fails:
int OnInit() { //... hIndi = iCustom(_Symbol,PERIOD_H1,"Indi"); if (hIndi == INVALID_HANDLE) { Print("Handle Indi failed, err:",err()); return(INIT_FAILED); } //... }
I get 4802 as well .
Try indi.ex5
It works without the extention here too , on init . That means the file is not there or you are reading the wrong folder
int hIndi=INVALID_HANDLE; int OnInit() { //--- hIndi = iCustom(_Symbol,PERIOD_H1,"forum\\custom_ema_on_array"); if (hIndi == INVALID_HANDLE) { Print("Handle Indi failed, err:",GetLastError()); return(INIT_FAILED); }else{ Print("Yay"); } //--- return(INIT_SUCCEEDED); }
You're right with "Indi.ex5" it works, and the next indicator I call without ex5 (only the name)?
And now tell me that computers are lifeless machines without their own quirks and spleens.
There also seems to be a maximum length.
Forum on trading, automated trading systems and testing trading strategies
Getting error 4802 when loading custom indicator that loads another custom indicator with iCustom
Martin Bittencourt, 2020.07.26 07:24
Hi,
for the record, I figured out my previous solution was actually incorret. Now I was doing a similar stuff with another indicator (i.e. creating an EA that used a custom indicator which called for another custom indicator) and I got exactly the same problem I had with the case of this thread - but now, there was anything 'problematic' with the file path using spaces or special symbols.
Then, upon better inspection, I noticed the problem was just too big filepath: the name of indicator was being cut. So I shrinked the indicator's name and everything started working.
So, the correct solution is: don't use too big filepaths for your indicators =)
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
and would be able to give a hint how to defeat it?
I have built an indicator that runs on all symbols and timeframes since quite a while! But now when I want to load it in OnInit() in my EA the
error 4802 appears, unfortunately without any hint where to start to do something about it :(
I (Win 10, MT5, b.3580) have checked, deleted and again wrote the indicator under a new name in \MQL5\Indicators\ (where two others are saved and loaded by my EA without problem).
My indicator does not have/need resources nor other indicators with the same or different timeframes.
The EA runs in the same timeframe as the indicator.
I have read https://www.mql5.com/en/forum/357491 where he deleted the project file - I have no project just my indicator(s) in \MQL5\Indicators\ and the EA in \MQL5\Experts\