How to detect if currently backtesting or not?

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.

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 ...
     }
Malacarne:
Thank you! :)