Launching EA using Script or from another EA WITHOUT DLL

 

Hi,



https://www.mql5.com/en/forum/115967/page3 lists a method to launch an EA from a script/another EA.

However, it requires enabling of DLL.

Has anyone managed to do so WITHOUT the use of DLL?


Consider the scenario


1. Open MT5

2. Attach "controller" EA/script to a default chart manually.

3. Controller EA will fire up all the other charts and EA for each chart and load the appropriate .SET file.

4. Synchronize the account with VPS and turn off the client PC.


Thoughts

a. Using DLL will cause issues with the VPS. (I was searching for "best practices for using a VPS" with no luck,but did see that VPS do not like DLLs)

b. Use of profiles is considered.  However, so far my experience with using profiles is that I often accidentally change stuff without realizing it. (e.g. closing a chart when on 1 profile means the next time u open the profile again, the chart is still missing) Please enlighten if this is not true.  

c. Considered "chart.mqh" (https://www.mql5.com/en/docs/standardlibrary/cchart/cchartopen) which can open a chart.  But not seeing a method to attach an EA to Chart.


Does anyone have a solution?



Apologies if this has been posted before.

Execute an existing EA from a script/ea ?
Execute an existing EA from a script/ea ?
  • 2018.10.07
  • www.mql5.com
Hello, Is it possible run existing EA from a script/ea ? If so, is it possible to define the ea settings like Pair, Timeframe and parameters...
 

Here you find virtually all chart functions: https://www.mql5.com/en/docs/chart_operations.

There you find a function to aplly a template to a chart - if the template 'contains' you EA it is started...

Documentation on MQL5: Chart Operations
Documentation on MQL5: Chart Operations
  • www.mql5.com
Functions for setting chart properties (ChartSetInteger, ChartSetDouble, ChartSetString) are asynchronous and are used for sending update commands to a chart. If these functions are executed successfully, the command is included in the common queue of the chart events. Chart property...
 
Keith Long:

Does anyone have a solution?

https://www.mql5.com/en/code/19003

Expert
Expert
  • www.mql5.com
All other files on this page provide examples/scenarios of library application; they are not needed for the operation of the library. Features Example The library use examples/scenarios are attached to the description. ExpertsRemove.mq5 ExpertsReopen.mq5 ChartsClose.mq5 ExpertLoader_Example.mq5 ExpertsChange_Example.mq5 The above examples...
 

Thank you, Thank you :-)


Was just expecting a simple pointer on the commands.  You gave a library :-)

I should read the manual more.  Its there in the ChartApplyTemplate function.... but it did not occur to me that EA is a template.  My bad.  \facepalm

Will study your code more. 

Thank you once again :-)

 
Keith Long: but it did not occur to me that EA is a template. 

EA is an EA, a template is a template - they are not the same. But a template can place an EA on a chart, and that was previously stated in #1.

Carl Schreiber: - if the template 'contains' you EA it is started...