How To Set OnDeinit-REASON_RECOMPILE for files compiled via command line

 
 is there a way to detect/set OnDeinit->REASON_RECOMPILE for files compiled via command line
 

It's not clear what you are asking "detect/set" ? Detect from where ?

What are you trying to achieve ?

 
Alain Verleyen #:

It's not clear what you are asking "detect/set" ? Detect from where ?

What are you trying to achieve ?

Probably the question is related to unability to refresh charts in running MT5 with programs compiled from an external command line.
Is it true that compiling via Command Line does not refresh the EA in Terminal?
Is it true that compiling via Command Line does not refresh the EA in Terminal?
  • 2018.07.12
  • www.mql5.com
Maybe I'm missing something, but I tried several times (changing working directories) used all parameters of Metaeditor in Command Line mode (excep...
 
Stanislav Korotky #:
Probably the question is related to unability to refresh charts in running MT5 with programs compiled from an external command line.

Thank you, you clearly understand the context of the case. Technically, the final result is quite predictable.

But before this, I've tried this method several times and modified it so that the terminal window doesn't close.

I've tried suspending and resuming the thread from the terminal, and refreshing the navigation, but I still can't activate OnDeInit -> for REASON_RECOMPILE (2) on the active EA on the chart.

The point is how to emulate the built-in compilation process of MetaEditor so that it can be applied in other IDEs/TextEditors, without having to stop the process/taskkill the terminal, but even OnDeInit() can produce reason 2.

 
kangjeki #:
The point is how to emulate the built-in compilation process of MetaEditor so that it can be applied in other IDEs/TextEditors...

I don't know about emulating MetaEditor. It would seem to be reverse engineering which might pose legal issues.

Integration with VS, for example, is different:

Forum on trading, automated trading systems and testing trading strategies

[MQL5] If you do not use MetaEditor to code, which alternative editor do you use?

Fernando Carreiro, 2017.11.03 15:38

I usually compile in MetaEditor for convenience, because I can just double-click on the warnings and errors and go directly to the offending lines.

However, you can also setup it up to compile from within VSCode, using MetaEditor's command line parameters and have the compilation log open up in VSCode automatically.


 
kangjeki #:

Thank you, you clearly understand the context of the case. Technically, the final result is quite predictable.

But before this, I've tried this method several times and modified it so that the terminal window doesn't close.

I've tried suspending and resuming the thread from the terminal, and refreshing the navigation, but I still can't activate OnDeInit -> for REASON_RECOMPILE (2) on the active EA on the chart.

The point is how to emulate the built-in compilation process of MetaEditor so that it can be applied in other IDEs/TextEditors, without having to stop the process/taskkill the terminal, but even OnDeInit() can produce reason 2.

I think it's still not possible at the moment.The only workaround I can imagine is to run an MQL5 service which monitors required ex5-file in the file system and if it's changed due to compilation in an external command line process, then reload/reapply template (tpl-file) for this chart. Did not try it on practice.