Hi,
I get annoying problems with 2 indicators out of 4 used in my EA.
Whatever I do, the EA fails to load them, even though they get compiled successfully into resources and the other 2 indicators work fine.
They only work when I put the files into the indicator folder, which gives me the impression that they don't get called from resources. However, the other 2 indicators do.
Both absolute strength indicators create this error:
2013.09.27 11:00:18 Tester expert file C:\Users\XXX\AppData\Roaming\MetaQuotes\Terminal\D0E8209F77C8CF37AD8BF550E51FF075\MQL5\Indicators\AbsoluteStrengthMarket_v1.ex5 open error [2]
2013.09.27 11:00:18 Tester expert file C:\Users\XXX\AppData\Roaming\MetaQuotes\Terminal\D0E8209F77C8CF37AD8BF550E51FF075\MQL5\Indicators\AbsoluteStrength_v2.ex5 open error [2]
Your moderator team.
When I tried to post the EA in the market without putting them into resources, Alexx told me:
Hello,
You need to include the required indicators as resources to the EA.
Use #resource "<path_to_resource_file>" to include indicators and "::Indicators\<path>" to call the indicators in the code.
So thats what I did.
Your moderator team.
When I tried to post the EA in the market without putting them into resources, Alexx told me:
Hello,
You need to include the required indicators as resources to the EA.
Use #resource "<path_to_resource_file>" to include indicators and "::Indicators\<path>" to call the indicators in the code.
So thats what I did.
You didn't ask why ? if your Indicator is in the Indicator folder why do you need to do this ? perhaps it is a UAC issue . . .
I knew why. Because to be in the market, I could not tell people to download specific indicators, put it in the folder there and there, do that and that.
When people download the EA from the market with their MetaTrader Client, it has to work right away, even with the indicators not being downloaded by them.
So, Alexx told me to put them into resources, because otherwise I could not publish the EA in the market.
So, now I have 2 indicators that work fine with resources, and 2 that don't. And I have no clue, why.
Did you check if the Indicators exist in the Virtual Store ?
How do I do that?
All 4 indicators get compiled successfully into the ex5.
I checked that.
All my files are in appdata/roaming folder for all my metatrader installations. So there shouldnt be a problem with UAC. Especially not, that 2 indicators work and 2 don't, even though all 4 got compiled.
Of course, I tested the EA in a fresh installation, where none of the indicators is installed in.
Also, thank you for your help and time so far.
Your moderator team.
When I tried to post the EA in the market without putting them into resources, Alexx told me:
Hello,
You need to include the required indicators as resources to the EA.
Use #resource "<path_to_resource_file>" to include indicators and "::Indicators\<path>" to call the indicators in the code.
So thats what I did.
I think the best thing to do is to post a reply to Alexx and ask him some help.
asHandle = iCustom(Symbol(), 0, "::Indicators\\AbsoluteStrength_v2", ..................);
Did you test the handle and print error n° ?
if(asHandle==INVALID_HANDLE) Print("Handle invalid for ... error= ", GetLastError());
I knew why. Because to be in the market, I could not tell people to download specific indicators, put it in the folder there and there, do that and that.
When people download the EA from the market with their MetaTrader Client, it has to work right away, even with the indicators not being downloaded by them.
So, Alexx told me to put them into resources, because otherwise I could not publish the EA in the market.
Did you test the handle and print error n° ?
This is what I get:
2013.09.27 11:53:23 Core 1 program file Indicators\AbsoluteStrength_v2.ex5 read error
2013.09.27 11:53:23 Core 1 loading of AbsoluteStrengthMarket_v1 USDJPY,H1 failed
2013.09.27 11:53:23 Core 1 2013.01.01 00:00:00 cannot load custom indicator 'AbsoluteStrengthMarket_v1' [4802]
4802 is wrong handle isn't it?
But still it loads the other one and it works if I just put them in the folder by myself.
- 2009.11.23
- Андрей
- www.mql5.com
This is what I get:
2013.09.27 11:53:23 Core 1 program file Indicators\AbsoluteStrength_v2.ex5 read error
2013.09.27 11:53:23 Core 1 loading of AbsoluteStrengthMarket_v1 USDJPY,H1 failed
2013.09.27 11:53:23 Core 1 2013.01.01 00:00:00 cannot load custom indicator 'AbsoluteStrengthMarket_v1' [4802]
4802 is wrong handle isn't it?
But still it loads the other one and it works if I just put them in the folder by myself.
- 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,
I get annoying problems with 2 indicators out of 4 used in my EA.
Whatever I do, the EA fails to load them, even though they get compiled successfully into resources and the other 2 indicators work fine.
They only work when I put the files into the indicator folder, which gives me the impression that they don't get called from resources. However, the other 2 indicators do.
Both absolute strength indicators create this error:
2013.09.27 11:00:18 Tester expert file C:\Users\XXX\AppData\Roaming\MetaQuotes\Terminal\D0E8209F77C8CF37AD8BF550E51FF075\MQL5\Indicators\AbsoluteStrengthMarket_v1.ex5 open error [2]
2013.09.27 11:00:18 Tester expert file C:\Users\XXX\AppData\Roaming\MetaQuotes\Terminal\D0E8209F77C8CF37AD8BF550E51FF075\MQL5\Indicators\AbsoluteStrength_v2.ex5 open error [2]
Can someone help me?
This is how I create the resource:
This is the call into iCustom for handle:
(Note, I also tried "::Indicators\\AbsoluteStrength_v2.ex5" and "::Indicators\AbsoluteStrength_v2", because I got confused due to the error" but nothing works)