On build 711, if I compile an EA using the command line compiler mql.exe:
1. The EA will not appear in the experts folder unless the terminal is restarted
2. Even after the restart, the EA is grayed out can not be attached to a chart.
NOTE: This is not the normal "gray out" when an EA has not been compiled. It appears to be a little different.
When you double-click the EA, the Experts tab reads "Cannot open file XXXX.ex4 "
If you open the MetaEditor and compile the EA, everything works fine.
Has anyone else seen this? I'd like to be able to build with mql.exe and run the EA without opening the MetaEditor.
Thanks for any help.
Nope - not a timestamp issue. It seems an EA must be built using the MetaEditor - and/or whatever process builds EAs when the platform is opened and there is an mq4 file, but not an ex4. (Same process runs when you right-click refresh on the EA menu in the platform).
Strange, because I thought MT was supporting the command line compiler ... it seems like it is useless at this point.
OK, figured it out. You need to pass the mql compiler (mql.exe) the correct working directory, then it works OK. Here is an example:
mql.exe /i:"C:\Program Files (x86)\FXCM MetaTrader 4\MQL4\Experts" /mql4 myTestEa.mq4
It's all about the /i command.
I hope this helps somebody ...
To answer your question, you can compile OK - it builds and creates an ex4, but the EA is grayed out if you don't pass the right "working directory".
This may be documented somewhere, but I did not see it.
Do you know about the new directory system of mt4?
Look at the terminal's option: File => Open Data Folder.
In case you have started the terminal in /portable mode it's easy - in your case I guess "C:\Program Files (x86)\FXCM MetaTrader 4\MQL4\Experts"
In mt4-standard-mode you should see a folder like: "C:\Users\cas\AppData\Roaming\MetaQuotes\Terminal\8232B25980EFCE21F0FE92E85200F661\MQL4\Experts"
At the bottom of this page you have the new file structure