Download MetaTrader 5

Feature in StrategyTester

To add comments, please log in or register
Ingvar Engelbrecht
4506
Ingvar Engelbrecht  

I do not know if this is possible already but if not I believe it would be a useful feature.

Before starting a new combination of input parameter a user exit should be taken where the combination could be rejected or accepted. An example is when using crossing averages.

If the long and the short period are of the same length or the long period is shorter than the short period these combination should be possible to reject. Just an example.

Simon Gniadkowski
Moderator
18021
Simon Gniadkowski  
ingvar_e:

I do not know if this is possible already but if not I believe it would be a useful feature.

Before starting a new combination of input parameter a user exit should be taken where the combination could be rejected or accepted. An example is when using crossing averages.

If the long and the short period are of the same length or the long period is shorter than the short period these combination should be possible to reject. Just an example.

Just add a check for this in OnInit() and if true set a bool SkipTesting = true,  then in OnTick() check this b0ol and if true return(0) immediately . . .
Alain Verleyen
Moderator
32858
Alain Verleyen  
RaptorUK:
Just add a check for this in OnInit() and if true set a bool SkipTesting = true,  then in OnTick() check this b0ol and if true return(0) immediately . . .

With mql5, you can use something like above in OnInit()

return(INIT_PARAMETERS_INCORRECT);

see documentation.

Ingvar Engelbrecht
4506
Ingvar Engelbrecht  
angevoyageur:

With mql5, you can use something like above in OnInit()

see documentation.

Simple as that :-)

Thanks.

To add comments, please log in or register