Demo only EA

 

Many of the EA's available for purchase offer a demo mode only or strategy tester only mode for "trying" out the EA. Will someone please provide the code for allowing a EA to run in demo and/or strategy tester mode only?

One additional question. I purchased one EA when I first began looking into the Forex market and I had to register the EA and get a key before it would work. Will someone also please point me in the direction of where I can find the code and/or process that does that?

Thanks!

 

see IsDemo() and IsTesting()

 
phy wrote >>

see IsDemo() and IsTesting()

Thank you phy! I searched but I guess my seach string wasn't worded well enough.

 
icwalter wrote >>

Thank you phy! I searched but I guess my seach string wasn't worded well enough.

phy, I'm running on a demo account but the IsDemo() returns false. I have live accounts as well with my broker but currently I'm logged into my demo account. Any idea why IsDemo() returns false?

Thanks!

 
bool IsDemo( )
Returns TRUE if the expert runs on a demo account, otherwise returns FALSE.
 

Hello, I am having the same problem. I´m logged in a Demo account but IsDemo() is returning FALSE.

if(IsDemo()) Alert("Demo"); else Alert("Not Demo");

My bank is AVAFX. Could someone help me?

 
Rodorush:

Hello, I am having the same problem. I´m logged in a Demo account but IsDemo() is returning FALSE.

if(IsDemo()) Alert("Demo"); // returns false

My bank is AVAFX. Could someone help me?

Talk to your Broker.
Reason: