isoptimization doesn't seem to work for me....!!!

 

Hi All,


I am new MQL4/5 .... I am just running tests at the moment to familiarize myself with function etc...


https://docs.mql4.com/check/isoptimization

I tried the below EA code in the optimization mode given the below settings in strategy tester as attached.

although, I have the below code in EA, I don't get to see any message  in journal tab:

    if(IsOptimization())  Print("I am optimizing now");


Please let me know why:

Thank


void OnTick()
  {
     
    if(IsTesting()) Print("I am testing now");
    if(IsOptimization())  Print("I am optimizing now");
    Print("MODE_STOPLEVEL = ", MarketInfo (Symbol(), MODE_STOPLEVEL));
   
  }
IsOptimization - Checkup - MQL4 Reference
IsOptimization - Checkup - MQL4 Reference
  • docs.mql4.com
IsOptimization - Checkup - MQL4 Reference
 

Forum on trading, automated trading systems and testing trading strategies

When you post code please use the CODE button (Alt-S)!

Use the CODE button

 
 

Sergey Golubev:

don't attach an image, insert the image

Users with low ranking do not seem to have an option for image insertion. E.g. I don't see that image icon here in the editor. Insert code works, though.
 
lippmaje:
Users with low ranking do not seem to have an option for image insertion. E.g. I don't see that image icon here in the editor. Insert code works, though.

It is strange ... it is something new ...
You are the second person who informed about it ...

 
lippmaje:
Users with low ranking do not seem to have an option for image insertion. E.g. I don't see that image icon here in the editor. Insert code works, though.

thats right ... I couldn't insert the images so attached them.

 
If I remember correctly, the Print function and some other output functions are ignored when optimizing.
Reason: