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)
I had to make this on my EA in order to get them working correctly.
I hope it will help you.
R.
This can't be the solution. #property tester_indicator is needed for testing with Strategy Tester in some circumstances. But here the issue is that the EA compiled with resources don't even load on a chart.
Asad Sheikh: i tried to modify the function for mql4 but getting error
Do or do not, there is no try.
An error is meaningless. "Doesn't work" is meaningless — just like saying the car doesn't work. Doesn't start, won't go in gear, no electrical, missing the key, flat tires — meaningless. How To Ask Questions The Smart Way. 2004 When asking about code
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
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)
Hi Klammeraffe,
Try something like this:
#property tester_indicator "your indicator"
I had to make this on my EA in order to get them working correctly.
I hope it will help you.
R.
Hi Klammeraffe,
Try something like this:
#property tester_indicator "your indicator"
I had to make this on my EA in order to get them working correctly.
I hope it will help you.
R.
Hi,
Alexx found the solution to the problem.
It was not caused by the EA but by the used indicators. Both absolute strength indicators called themselve via iCustom function.
The call of course asked for the file in the installation/roaming directory of the terminal by default.
So basically, I needed to tell the indicator to take the file out of the EAs resources.
Original:
Then Alexx gave me this function to automatically check for the right path:
And this needed to be called in OnInit:
And this needed to be called in OnInit:
Hi,
Alexx found the solution to the problem.
It was not caused by the EA but by the used indicators. Both absolute strength indicators called themselve via iCustom function.
The call of course asked for the file in the installation/roaming directory of the terminal by default.
So basically, I needed to tell the indicator to take the file out of the EAs resources.
Original:
Then Alexx gave me this function to automatically check for the right path:
hello georg,
i am facing the same issue in mql4 i tried to modify the function for mql4 but getting error and not able to use it properly can you help
(i know i am replying 2013 post but i need help anyone? )
Don't Hijack other threads for your off-topic post. Next time, make your own, new, thread.
Open the «Data Folder»\Indicators and make sure the executable is there
Data Structure in MetaTrader 4 Build 600 and Higher - MQL4 Articles 2014.02.03
Do or do not, there is no try.
An error is meaningless. "Doesn't work" is meaningless — just like saying the car doesn't work. Doesn't start, won't go in gear, no electrical, missing the key, flat tires — meaningless.
How To Ask Questions The Smart Way. 2004
When asking about code
Always post all relevant code.
How To Ask Questions The Smart Way. 2004
Be precise and informative about your problem
We can't see your broken code.
Fix your broken code.
With the information you've provided — we can only guess. And you haven't provided any useful information for that.