Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
Hi,
I want a simple way to determine whether an EA is running in a System Test or if it is running on a chart.
How can I do this?
I know it must involve using the OnTester() function, but I'm not sure exactly how to achieve this.
I was thinking if there is a way to create some global variable that the OnTester function could then update, perhaps?
The reason for this is because I want to run different code depending upon whether the EA is executing in a System Test or not.
That is to say,
If (OnTester() == TRUE {
do Test Functions;
} Else {
do Realtime Functions;
}