Detect Demo or real account in strategy tester?

 

How can I detect if account is real in strategy tester?

AccountInfoInteger(ACCOUNT_TRADE_MODE) always returns ACCOUNT_TRADE_MODE_DEMO for my real account in strategy tester but in live trading it returns correct value.

Testing on Roboforex MT5 account.

 
  1. Because demo/live is orthogonal to various tester modes.
  2. Why do you care? Other than diagnostics during non-live/non-optimizer modes, you shouldn't be doing anything different.
  3. Test for it.
              Write logging data to text file? - Expert Advisors and Automated Trading - MQL5 programming forum #3 20.04.21
 
I'm trying to use this for license control. My license server will record the account number and state of be demo or not. This make it difficult when I can't tell it is really a demo account or it's a real account in the tester.
 
If it's in the tester, it's not live trading; isn't that the definition of demo?
 
Victor Aluda:
Hello, Am having a problem of closing all opened position on a moblie android mt4 app platform. I have opposing trades. The "multiple close by" option is not displaying. Are you able to help???

Hello, Am having a problem of closing all opened position on a moblie android mt4 app platform. I have opposing trades. The "multiple close by" option is not displaying. Are you able to help???

Reason: