Baktesting Optimization parameters

 

Hi at all,

in execution of ea in backtesting optimization:

- is there a way/function/parameter for get number pass of backtesting optimizzation ?

- is there a way/function/parameter for get input/extern variables name in optimization mode ?

- is there a way/function/parameter for terminate pass of optimization in execution, for go to next ?

Very thanks at all

 
Davide Tedesco:

Hi at all,

in execution of ea in backtesting optimization:

- is there a way/function/parameter for get number pass of backtesting optimizzation ?

- is there a way/function/parameter for get input/extern variables name in optimization mode ?

- is there a way/function/parameter for terminate pass of optimization in execution, for go to next ?

Very thanks at all


yes,yes,no

https://www.mql5.com/en/docs/optimization_frames


to terminate an optimization pass ,you have to put some codes INSIDE your EA to judge some preconditions.

by "INSIDE" i mean codes in OnInit() / OnTradeTransaction()/ OnTrade()/ OnTick()

you can not control an optimization pass from OUTSIDE.

by "OUTSIDE" i mean codes in OnTesterInit()/ OnTesterPass()/ OnTesterDeinit(), they are used to handle the test results COMING OUT of the optimization process.

Documentation on MQL5: Working with Optimization Results
Documentation on MQL5: Working with Optimization Results
  • www.mql5.com
Functions for organizing custom processing of the optimization results in the strategy tester. They can be called during optimization in testing agents, as well as locally in Expert Advisors and scripts. When you run an Expert Advisor in the strategy tester, you can create your own data array based on the simple types or simple structures (they...
 
tickfenix:


yes,yes,no

https://www.mql5.com/en/docs/optimization_frames


to terminate an optimization pass ,you have to put some codes INSIDE your EA to judge some preconditions.

by "INSIDE" i mean codes in OnInit() / OnTradeTransaction()/ OnTrade()/ OnTick()

you can not control an optimization pass from OUTSIDE.

by "OUTSIDE" i mean codes in OnTesterInit()/ OnTesterPass()/ OnTesterDeinit(), they are used to handle the test results COMING OUT of the optimization process.

Yes. TesterStop().

Documentation on MQL5: Common Functions / TesterStop
Documentation on MQL5: Common Functions / TesterStop
  • www.mql5.com
The TesterStop() function is designed for a routine early shutdown of an EA on a test agent – for example, when reaching a specified number of losing trades or a preset drawdown level. TesterStop() call is considered a normal completion of a test, therefore the OnTester() function is called, and the entire accumulated trading statistics and...
 
Alain Verleyen:

Yes. TesterStop().


"The TesterStop() function is designed for a routine early shutdown of an EA on a test agent – for example, when reaching a specified number of losing trades or a preset drawdown level."

TesterStop() is still an "INSIDE" function. You have no way to get information such as " reaching a specified number of losing trades or a preset drawdown level" from "OUTSIDE".

As I understand it, all three of @Davide Tedesco 's questions are about "OUTSIDE" control of optimization work.


 
tickfenix:


"The TesterStop() function is designed for a routine early shutdown of an EA on a test agent – for example, when reaching a specified number of losing trades or a preset drawdown level."

TesterStop() is still an "INSIDE" function. You have no way to get information such as " reaching a specified number of losing trades or a preset drawdown level" from "OUTSIDE".

As I understand it, all three of @Davide Tedesco 's questions are about "OUTSIDE" control of optimization work.


It's you who are talking about "inside/outside", the OP doesn't make such distinction. Let him decide.
 

ohh! very very thanks,

I am very happy to read this very interesting documentation !!!


but, i'm very sorry, for once I don't specify it:

but can i use this functions in mql4 ?


I need this functions for a part of new implementation in my framework,

for this i must begin to terminare this new implementation,

and i don't want to pass my framework ea in mql5 before study well mql5.


but vey very thanks, because i will study this documentation,

and it will be very useful for many idea to consider in my analysis

Documentation on MQL5: Constants, Enumerations and Structures / Named Constants / Predefined Macro Substitutions
Documentation on MQL5: Constants, Enumerations and Structures / Named Constants / Predefined Macro Substitutions
  • www.mql5.com
//| Expert initialization function                                   | //| Expert deinitialization function                                 | //| Expert tick function                                             | //| test1                                                            |...
Reason: