Download MetaTrader 5

IsTesting() and IsOptimization() ..

To add comments, please log in or register
Carl Schreiber
7666
Carl Schreiber  

Hi,

does anybody know how IsTesting() and IsOptimization() are connected:

1) Not connected: if IsOptimization()==true =>  IsTesting() == false ?

2) Connected: if IsOptimization()==true =>  IsTesting() == true (too) ?

Which one is correct?

Thanks Gooly

whroeder1
16539
whroeder1  
enum            eStatusChart    {LIVE, VISUAL, OPTIMIZER};
eStatusChart status_chart;                      // Export to CAProgress/Later.

int      Oninit(){
   if      ( !IsTesting() )   status_chart   = LIVE;
   else  if( IsVisualMode() ) status_chart   = VISUAL;
   else{                      status_chart   = OPTIMIZER;
Carl Schreiber
7666
Carl Schreiber  

hmm - what if I run a test in non-VisualMode, your status_chart would assume OptimizeMode which is not the case.

I wanted to know if I have to write:

   ...
   if ( IsTesting() || IsOptimization() ) { ..

or would it be enough to write:

   ...
   if ( IsTesting() ) { ..

as IsTesting() covers (?) visual and non-visualt tests and the optimization.

To add comments, please log in or register