How to reload command line compiled scripts in Trading Terminal?

 

When I use Meta Editor IDE, as soon as compilation finishes, the scripts gets removed / reloaded immediately in Trading Terminal.

How can I achieve the same behaviour (reload / reinit scripts), when using command line compilation?

I can nicely compile the scripts using command line compilation, but I have to refresh the scripts manually each time. I can't really iterate fast without update automatically.

 
Geri_:

When I use Meta Editor IDE, as soon as compilation finishes, the scripts gets removed / reloaded immediately in Trading Terminal.

How can I achieve the same behaviour (reload / reinit scripts), when using command line compilation?

I can nicely compile the scripts using command line compilation, but I have to refresh the scripts manually each time. I can't really iterate fast without update automatically.

This is a good question.

I have found this myself since I prefer to work in a different editor than MetaEditor.

What I do:

1. I keep MetaEditor open on my right-monitor.

2. I edit using a different editor on the left-monitor.

3. Changes in the different editor are automatically detected by MetaEditor.

4. So, when it's time to compile, I simply click the compile button in MetaEditor, even though I have done no actual editing there.

 
Anthony Garot:

This is a good question.

I have found this myself since I prefer to work in a different editor than MetaEditor.

What I do:

1. I keep MetaEditor open on my right-monitor.

2. I edit using a different editor on the left-monitor.

3. Changes in the different editor are automatically detected by MetaEditor.

4. So, when it's time to compile, I simply click the compile button in MetaEditor, even though I have done no actual editing there.

Thanks for getting back. I did the same for a while (using VSCode, and compile for warnings / errors via command line), however, it can get pretty tedious when compiling too often, e.g. fiddling with some UI thing.

Perhaps there is a way to tell the Terminal to do the refresh thing. I'm wondering how MetaEditor and Terminal is wired up. I did not found any intermediate file that changes. Also, I did not found any mach message, or similar.

As a workaround, I can create a watcher script that polls the modification date for a given mql, then remove / readd a given script to a chart if anything changed. However, the input parameters must be preserved somehow for the indicators. Sounds a lot of upfront work, I'm not quite sure if it is worth it.

 

This is actually a terribly grumpy workaround, but I use cliclick to programatically invoke a click on MetaEditor Compile button from my build script.

It breaks whenever I move windows around and all, but for now it saves the day.

 
Geri_:

When I use Meta Editor IDE, as soon as compilation finishes, the scripts gets removed / reloaded immediately in Trading Terminal.

How can I achieve the same behaviour (reload / reinit scripts), when using command line compilation?

I can nicely compile the scripts using command line compilation, but I have to refresh the scripts manually each time. I can't really iterate fast without update automatically.

I'm using VS Code (its much more convenient for coding) and there you can install extension MQL Tools which allows you to compile with reloading expert on chart and without.

 
Fotikhbek Khusanov #:

I'm using VS Code (its much more convenient for coding) and there you can install extension MQL Tools which allows you to compile with reloading expert on chart and without.

You can also write little script on mql5 for loading and removing experts from chart

Reason: