order opened in live account

 

I am creating an ea on demo account of mt4.But After attching ea I did login in the live account it executes the ea .On order has been opened through the ea while I have disable the expert advisor when account has been changed.This message is also shows in expert tab.

I am also checking IsDemo in the init.So it should not be run .Can anyone help ? Thanks in advance .

 
amarsinghbishen:

I am creating an ea on demo account of mt4.But After attching ea I did login in the live account it executes the ea .On order has been opened through the ea while I have disable the expert advisor when account has been changed.This message is also shows in expert tab.

I am also checking IsDemo in the init.So it should not be run .Can anyone help ? Thanks in advance .

Why would take any such risk ? why not have one terminal installed in C:\MT4Installs\Broker_Name\Live\ and one in C:\MT4Installs\Broker_Name\Demo\ then you can keep running the Demo while the Live is running and you have no such issues, even if your code is buggy.
 
RaptorUK:
Why would take any such risk ? why not have one terminal installed in C:\MT4Installs\Broker_Name\Live\ and one in C:\MT4Installs\Broker_Name\Demo\ then you can keep running the Demo while the Live is running and you have no such issues, even if your code is buggy.


Thank you for the response RaptorUK .But I want to know how can this type of error may occur.Any guess?
 
amarsinghbishen:

Thank you for the response RaptorUK .But I want to know how can this type of error may occur.Any guess?
Yes, buggy code, which you haven't posted so it's just a guess. Or the order was already open when you logged back into the live account . . . you haven't shown any evidence for what you said happened so it's just a guess . . .
 
Thanks again RaptorUK .I am attching the snapshot the expert tab of live account which shows the experts are disable and then place a buy order in live account.
 
amarsinghbishen:
Thanks again RaptorUK .I am attching the snapshot the expert tab of live account which shows the experts are disable and then place a buy order in live account.

If you are attaching an image . . .

 
amarsinghbishen: ea on demo account of mt4.But After attching ea I did login in the live account it executes the ea .
I am also checking IsDemo in the init.So it should not be run
  1. If you had the EA attached and changed account to live the EA is now running live.
  2. How is "checking IsDemo in the init" stopping start() from running?
 
WHRoeder:
  1. If you had the EA attached and changed account to live the EA is now running live.

Shouldn't this stop the EA when the account is changed ?

amarsinghbishen:

I am creating an ea on demo account of mt4.But After attching ea I did login in the live account it executes the ea .On order has been opened through the ea while I have disable the expert advisor when account has been changed.

 

Messages in experts tab

I am attaching the snapshot of experts tab ..RaptorUK .Here shows that the experts are disabled the account has been changed and

then shows that an buy order placed in the same account..Please check it and guide me accordingly if possible.

 
can u post your EA ?
Reason: