This is error codes here on this page: https://www.mql5.com/en/docs/constants/errorswarnings/errorcodes
ERR_INDICATOR_CANNOT_CREATE | 4802 | Indicator cannot be created |
And it is one post about it (the thread with one post):
- www.mql5.com
hi all,
I am very new to mql5...
Hi and welcome here :)
But:
- Please if you post code use the code button (Alt+S= or the icon </>.
- If something is not working put the cursor on the MQL5 function and press F1.
- I am using the page: https://www.mql5.com/en/docs/function_indices to search for keywords if e.g. I have forgotten the function for a certain thing.
- The ref for iCustom says: If the path to the indicator is set in the subdirectory (for example, MyIndicators\ThirdIndicator), the search is first performed in the calling program folder (the EA is located in MQL5\Experts\MyExperts) in MQL5\Experts\MyExperts\MyIndicators\ThirdIndicator.ex5. If unsuccessful, the search for the MQL5\Indicators\MyIndicators\ThirdIndicator.ex5 file is performed. Make sure to use the double reverse slash '\\' as a separator in the path, for example iCustom(Symbol(), Period(), "MyIndicators\\ThirdIndicator"...)
So you need to check the path in your call of iCustom.
Good luck :)
- www.mql5.com
This is error codes here on this page: https://www.mql5.com/en/docs/constants/errorswarnings/errorcodes
ERR_INDICATOR_CANNOT_CREATE | 4802 | Indicator cannot be created |
And it is one post about it (the thread with one post):
Much appreciate the quick reply, but I have another similar code (which assign iRsi to a handle) in this same EA (actually this EA only has icustom and the iRsi ones for testing purpose ) that run properly, so it shouldn't be the file being corrupted.
I wonder if there is anything wrong with the code I posted? Or that I need to do something in the custom indicator in order to use icustom to call it.
Anyway thanks for help!
Hi and welcome here :)
But:
- Please if you post code use the code button (Alt+S= or the icon </>.
- If something is not working put the cursor on the MQL5 function and press F1.
- I am using the page: https://www.mql5.com/en/docs/function_indices to search for keywords if e.g. I have forgotten the function for a certain thing.
- The ref for iCustom says:
So you need to check the path in your call of iCustom.
Good luck :)
Thanks for the heads up! I revised accordingly.
I read the content in https://www.mql5.com/en/docs/indicators/icustom, but I am not sure I understand fully what mentioned inside.
The path is correct as another EA is able to call another custom indicator, so I wonder may be there is something needed to be done on "indicator1" before I can call it? And may I know if the code I listed is correct?
Thanks!
- www.mql5.com
int handle1; handle1=iCustom(Symbol(),0,"jon/indicator1",22,3.0,22); if(handle1==INVALID_HANDLE) return(INIT_FAILED); double testbuffer[]; ArraySetAsSeries(testbuffer, true); CopyBuffer(handle1,0,1,2,testbuffer); Print(testbuffer[0]); Print(testbuffer[1]);I think you should study CopyBuffer documentation closely.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
hi all,
I am very new to mql5, but I have some knowledge in programming (Python).
Currently I am trying to create a EA to read from a custom indicator, thus I wrote a simple code below to check if I can retrieve the information with icustom:
But I have received the following error message: cannot load custom indicator ' jon/indicator1 '[4802].
FYI I have done complied the "indicator1" .ex5 file , which I received from someone else.
Can anyone giving me some hints on how to correct it?
Much appreciate it!