Download MetaTrader 5

How to detect if currently backtesting or not?

To add comments, please log in or register
cyberglassed
613
cyberglassed  

Hello, some days ago, I saw a function in mql5 that let me know if the script

is running under the Strategy Tester but now I can't find it.

could you remember it to me?


Thanks, Cyberglassed.

Rodrigo Malacarne
Moderator
10388
Rodrigo Malacarne  
cyberglassed:

Hello, some days ago, I saw a function in mql5 that let me know if the script

is running under the Strategy Tester but now I can't find it.

could you remember it to me?


Thanks, Cyberglassed.

if(MQLInfoInteger(MQL_TESTER))
     {
      //--- do something ...
     }
cyberglassed
613
cyberglassed  
Malacarne:
Thank you! :)
To add comments, please log in or register