You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hello,
I'm facing the same issue. I've created a post some days ago about this but no solutions so far. This problem also happens if an indicator loads another indicators as resources in iCustom. The workaround to make it work is:
I noticed this problem several weeks ago and I hoped that it would be fixed in later MT5 versions, but this haven't happened. I can't tell when it began but I suspect it might have started after release 2485 because the release notes mention changes in iCustom (https://www.metatrader5.com/en/releasenotes/terminal/2145)
Here's how to reproduce the problem. First, create a sample indicator:
Then, create a sample EA to load this indicator (place the compiled SampleIndicator.ex5 file in the same folder as the SampleEA):
I attached the project files in this post. I hope this helps to solve the issue.
Thanks for the contribution. Having the same problem, I also managed to successfully run the application in the way you mentioned. The problem is that it works only once: for example, if you do backtesting, that won't be enough. Plus my project has quite a number of .ex5 on it, so that workaround is quite boring!
I was hoping there was a way to contact Metaquotes to give bug feedbacks, but so far it seems the only feedback available is for monetary issues :/
I think I know what may be happening. The path that mt5 creates to execute the indicator #resource is very long and this could be causing a failure. Try to rename the indicator to the smallest possible name and do a test.
Hi Davi,
I don't think this is the solution because:
1) this problem appeared after a MT5 release around October last year (I cant' tell which one exactly as we cannot use those versions again). I have been using resource loading to load my indicators when the EA starts up since Sept/2019 and I had no issues until those MT5 releases
2) If I remove all ex5 resources from the project (in the navigator window) and compile the project again, I'm able to start the EA and load my indicators. However, if I compile the project after this (it doesn't matter if I make changes or not to code), the error comes again. Then I have to repeat the process of removing all .ex5 files and compiling the project again to have this working again
Hi Davi,
I don't think this is the solution because:
1) this problem appeared after a MT5 release around June-October last year (I cant' tell which one exactly as we cannot use those versions again). I have been using resource loading to load my indicators when the EA starts up since Sept/2019 and I had no issues until those MT5 releases
2) If I remove all ex5 resources from the project (in the navigator window) and compile the project again, I'm able to start the EA and load my indicators. However, if I compile the project after this (it doesn't matter if I make changes or not to code), the error comes again. Then I have to repeat the process of removing all .ex5 files and compiling the project again to have this working again
It's a "project" issue. It's buggy and unusable for any real complex project.
Hi Alain,
What do you mean by "it's a project issue"? Do you mean that this feature (using ex5 files in EAs) is buggy in MT5, or do you mean that our projects are buggy and not using this feature correctly?
I've been using resources to pack my indicators (as ex5 files) inside an EA for over an year in a complex project, then I supply only the EA for the users. Supplying each indicator file individually is not an option, as the EA is a product that requires and uses the indicators included as resources. The indicators are loaded only once when the EA starts up. Only after Oct/2020 MT5 releases that the issue reported in this thread started to happen. If you know another way to pack indicators in a EA, please let us know, I will be glad to hear it.
Thanks
Hi Alain,
What do you mean by "it's a project issue"? Do you mean that this feature (using ex5 files in EAs) is buggy in MT5, or do you mean that our projects are buggy and not using this feature correctly?
I've been using resources to pack my indicators (as ex5 files) inside an EA for over an year in a complex project, then I supply only the EA for the users. Supplying each indicator file individually is not an option. The indicators are loaded only once when the EA starts up. Only after Oct/2020 MT5 releases that the issue reported in this thread started to happen. If you know another way to pack indicators in a EA, please let us know, I will be glad to hear it.
Thanks
I mean a project issue. In MetaEditor you have a feature called "project".
Include you indicator(s) in your EA without using a project. I deleted the project, I placed the indicator in MQL5\\Indicators folder.
The project feature is buggy and useless, it has been reported to Metaquotes but they don't care.
Hi Alain,
Thanks for the clarification. I understand now you're referring to "project feature" as the mqproj files, the Project tab in MetaEditor, and the project settings window. I was not adding the indicators through the project feature, I was specifying them with #resource in the source file.
However, I managed to find a solution. I generated the mqproj file again and compared to the old version. It seems that my old mqproj file became broken with the new MT5 releases. Here's the pattern I found out:
The old version (broken now, was working before):
"resources": [ { "type":"indicator", "path":".\\EX5\\SampleIndicator.ex5", "name":"", "relative_to_project":"true" }, .... ]
New version:
I updated all indicator entries in my old mqproj file and the issue seems to be gone.
Thanks
if I am not mistaken , place the indicator MQ5 file in the same folder where your main EA is placed, compile it after saving ( compile will generate an EX5 file), use iCustom with no any suffix or prefix , just the name of the indicator , handle_iCustom=iCustom(Symbol(), 0, "macd_Demo", 0); ,
https://www.mql5.com/en/docs/indicators/icustom
good luck