Launch EA from script

 

Hello there,

in order to optimize external variables' setting of an EA, I would like to write a script which sets those parameters' value, calls and executes the EA. The EA every time writes its results into a file. Ideally, I could even set the security the EA is tested on from externally.


Does anybody know how to do this? Is it possible from a script?


thank you very much in advance,

Hotte

 

Have the script write a file of settings.

Have the script set a global variable that says a new settings file is ready.

Have the EA check the global variable.

Have the EA read the file and reassign parameters on startup and during runtime (if a new file is there)

Have the EA reset the global variable.

 
Copy and paste the script code into the init() section, and there you have it. :)
 

Hello phy and blogzr3,

thanks for the answers. Not quite sure I got your respective points (see below).

And not sure neither if I explained myself sufficiently :-)


I developed an EA which runs with different external parameters. To test which parameter setting performs best on past time data, I want to AUTOMATICALLY have the parameters manipulated (say by a script or other EA) and REPEATEDLY run the EA in the strategytester, each time with different parameter settings, so I can compare the results of the different scenarioes.

At the end of each run, I want a file to be established with the performance results which then would be evaluated and processed in Excel (graphs etc.). Saving to the file is clear, no problems with that, but how do I control the EA's launch in the strategytester?


phy 2009.05.30 22:43

Have the EA read the file and reassign parameters on startup and during runtime


=> Can I relaunch the EA from within itself making it reprocess all Bars with reassigned parameters?


blogzr3 2009.05.30 22:56 Copy and paste the script code into the init() section, and there you have it. :)


=> I tried recalling init() but it doesn't relaunch start() on all Bars.


Meanwhile, I found this: Execute an existing EA from a script/ea ? and thought it might help but found that a hotkey launches the EA to runon live trading rather than in the strategytester.


Sorry for not having explained my problem clearly before, hope you can still provide help! Thanks again for answers to come!!!


Hotte

Reason: