Remember to always look up the meaning of the error code ...
ERR_WRONG_INTERNAL_PARAMETER
4002
Wrong parameter in the inner call of the client terminal function
This means that one or more of your parameters are incorrect for the custom indicator being called. It has nothing to do with any resource limitations.
Haven't you seen in my code explanations that in one version the icustom works very well with its list of parameters and that with another definition of the path to go through a resource putting it icustom with the same parameters so far from a 4002, doesn't work
wow. i remember you posting a thread with same reported issue and I posted a response with a link in the forum, from years ago, that demonstrated, very clearly what you can and cannot do in that path.
I agree that "the paths to the ex5 in classic path and resource path" are clearly different, but that was already demonstrated in a couple threads, including the thread I have mentioned, but a couple others besides.
Either you follow the correct syntax rules, or you dont, right?
If you have a semblance of an explanation, I am willing to find a solution.
If i remember correctly, we have to also deal with the spaces in filenames because when sourcing files outside the mql default folders, we deal with windows and the way it deals with files and filenames. The result is that it is never a good idea to have spaces in filenames if you want to source those files.
You could prove me wrong, however, I do remember in those same threads i mentioned, it was demonstrated by code and errors resulted with spaces in files, and no errors after removing those spaces in the filenames. This does not happen all the time, however, it often will create those errors.
EDIT: But I do not have a solution that you could use a single string in both lines of code. But, then, I do not see how it is an issue. It has always been like that. I will follow this thread, just in case that Fernando responds again, this time with something helpful :0Thanks, I'll try that too.
I think that this is the thread that both of us responded to. I added a further response with link to a russian link. just use browser translator when you get to the page.
https://www.mql5.com/en/forum/472069#comment_54881388
But there was a couple more similar threads in the forum. just search forum for resource.
- 2024.08.27
- Gerard William G J B M Dinh Sy
- www.mql5.com
It is because of that thread that I started putting my custom include files in same folder as my ea. There have been a few updates of mt4/5 that reported to have fixed this issue, however that very same thread demonstrated that the previous updates had, in fact, NOT dealt with the issue fully. Therefore I started working as if the issue was(not) and still clearly is not -- fixed as yet.
For this same reason, I am continuing to not use custom folders as you showed in your code, so no /Indicators/blah -- but just /Indicators or /experts. and half the time i use "filename.mqh" whenever i can. Since I started doing this, I have avoided many scenarios that I would get errors in the past.
EDIT: But this slighly diverted from your thread issue. sorry.- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Are there any limitations with #resource?
In an indicator
I have two resources
I have two icustom
The second icustom does not pass error 4002
What I find strange is that if I replace
by
it works very well
I don't understand the 4002
Thx