Real Or Demo Account

 

Hello Every one. Please how do I write the code that will determine if an account is real or demo.

 
bool IsDemo( )
Returns TRUE if the expert runs on a demo account, otherwise returns FALSE.
Sample:
  if(IsDemo()) Print("I work at a demo account");
  else Print("I work at a real account");
 

Hello everyone,

I have an account in WindsorBrokers-DEMO server. Note that It is a DEMO server.

I run below script on a chart:

void OnStart()
{
  Comment("My account is ", IsDemo() ? "DEMO" : "REAL");
}

But, the result shown as:  My account is REAL

What is the problem?

 
Reza5523 #:

Hello everyone,

I have an account in WindsorBrokers-DEMO server. Note that It is a DEMO server.

I run below script on a chart:

But, the result shown as:  My account is REAL

What is the problem?

Ask your broker to fix the issue.
Reason: