Hi,I have an indicator called DCBA . It works fine when I put it on a graph as well as when I call it with iCustom in my EA.From it, I created another indicator which loads DCBA. In the call in OnInit, nothing special:
glHandleDCBA1 = iCustom(_Symbol,DCBAPeriod1,"::Indicators\\Martinware\\DCBA\\MW DCBA.ex5"
if (glHandleDCBA1 == INVALID_HANDLE)
Alert("Error loading MW DCBA 1 (error: ",GetLastError(),")");
When I load this indicator in a graph, it works fine. But now, when I try to load it from within my EA using iCustom, I get error 4802. I did some research on the forum about this problem and the only possible solution I found was to add
#property tester_indicator "MW DCBA.ex5"
on it, but it didn't solve my problem :/ So, how to make my new indicator load DCBA properly when called with iCustom? Why in this case it gets an error, but when I attach it on a graph, everything works fine? Any help will be appreciated!
Are you working with resources? Why don't you talk about it?
Oh, I didn't see any reason to comment on that. Any way, I always include my indicators as resources :)
#resource "\\Indicators\\Martinware\\DCBA\\MW DCBA.ex5"
Is that wrong? :| I mean, it always worked and, giving the concept of resources, it made sense to always do that :)
How To Ask Questions The Smart Way. 2004 Be precise and informative about your problem
You call your indicator as a resource. But does that indicator have its resource?
Hi,I'm not so sure what you mean. The DCBA indicator, the one being called with iCustom, has resources included (audio files). But I suppose this shouldn't affect in anything, after all, once compiled, the resource becomes part of the .ex5, so when iCustom calls it, it is already calling for a complete, fully functional file with its own resources included. Remembering: DCBA works fine on its own both when attached to a graph as well as when called by iCustom in an EA.Regarding your links, I can't see why should I have mentioned that. After all, I've been calling indicators as resources since forever and I never got problems with that. Moreoever, to do so its a viable method included in MT5's help files, so I would have never assumed the problem would have anything to do with a million-times 'used and ok' system.
"::Indicators\\Martinware\\- Unfinished\\MW My Indicator.ex5",
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 =)