Running script using CMD

 

Greetings,

I have encounter that I can run script on terminal startup (https://www.metatrader4.com/en/trading-platform/help/service/start_conf_file), but I would like to load the script after startup or is there any way for me to run script using command line?


Regards.

Configuration at Startup - Tools - MetaTrader 4 Help
Configuration at Startup - Tools - MetaTrader 4 Help
  • www.metatrader4.com
The client terminal can be launched with some predefined settings. For this purpose, the configuration file name will be passed to the client...
 
Google for "mt4 shell32.dll ShellExecuteW()"
 
Carl Schreiber:
Google for "mt4 shell32.dll ShellExecuteW()"


Hi thanks for your suggestion, is this the only way?

Would love if Metatrader have built in command like MetaEditor compilation instead of requiring user to use the .dll

 
xjellyfishx: Would love if Metatrader have built in command like MetaEditor compilation instead of requiring user to use the .dll
  1. This isn't Burger King, you don't get it your way.
 


Hi, thanks for your reply, but upon seeing the topics, it seem different than what I wanted.

The topics were executing command from MQL but what I want is executing script using CLI.

For example like in MetaEditor I can compile to ex4 using CMD:-

"C:\Program Files\TradingPlatform\metaeditor64.exe" /compile:"C:\Program Files\TradingPlatform\MQL5\Scripts\myscript.mq5"


Sorry if I got it wrongly or my question is unclear.

Regards.

 
xjellyfishx: I have encounter that I can run script on terminal startup   but I would like to load the script after startup
  1. Can't do it on startup since there isn't code running yet.
  2. If you had used this you would have found this.
 
whroeder1:
  1. Can't do it on startup since there isn't code running yet.
  2. If you had used this you would have found this.

I see, guess what I wanted to do isn't implemented.

Is there any way for me to place order using CLI?

For example, I can compile my mq4 to ex4 using CLI without opening MetaEditor.

Thank you for your time.

 
xjellyfishx: Is there any way for me to place order using CLI?
That's easy, have the CLI create a file that the running EA reads.
 
whroeder1:
That's easy, have the CLI create a file that the running EA reads.


Hmm..not the way I wanted but guess have to go with it.

Thanks alot for the suggestion and your help.

 
xjellyfishx:


Hi thanks for your suggestion, is this the only way?

Would love if Metatrader have built in command like MetaEditor compilation instead of requiring user to use the .dll

Some time ago Metaquotes offered a program which I used to compile mq4 code out of the notepad++ but this is not longer supported...  :(
 
Carl Schreiber:
Some time ago Metaquotes offered a program which I used to compile mq4 code out of the notepad++ but this is not longer supported...  :(


Oh, atleast now they have CLI for it.

Still waiting for maybe running script on mobile.