Download MetaTrader 5

How to detect if currently backtesting or not?

To add comments, please log in or register
cyberglassed
611
cyberglassed 2014.05.06 23:39 

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
9940
Rodrigo Malacarne 2014.05.07 03:48  
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
611
cyberglassed 2014.05.07 07:13  
Malacarne:
Thank you! :)
To add comments, please log in or register