Why my EA does not work in a real account

 

It works perfectly in demo account, and I don't know why

It says "uninit reason 6", please help, thank you

Documentation on MQL5: Standard Constants, Enumerations and Structures / Environment State / Account Properties
Documentation on MQL5: Standard Constants, Enumerations and Structures / Environment State / Account Properties
  • www.mql5.com
Standard Constants, Enumerations and Structures / Environment State / Account Properties - Documentation on MQL5
 
i4kira:

It works perfectly in demo account, and I don't know why

It says "uninit reason 6", please help, thank you

Did you read this ?  https://www.mql5.com/en/docs/constants/namedconstants/uninit

REASON_ACCOUNT

6

Another account has been activated or reconnection to the trade server has occurred due to changes in the account settings

Documentation on MQL5: Standard Constants, Enumerations and Structures / Named Constants / Uninitialization Reason Codes
Documentation on MQL5: Standard Constants, Enumerations and Structures / Named Constants / Uninitialization Reason Codes
  • www.mql5.com
Standard Constants, Enumerations and Structures / Named Constants / Uninitialization Reason Codes - Documentation on MQL5
 
RaptorUK:

Did you read this ?  https://www.mql5.com/en/docs/constants/namedconstants/uninit

REASON_ACCOUNT

6

Another account has been activated or reconnection to the trade server has occurred due to changes in the account settings

I am a noob. I don't understand. It means my Internet connection isn't well???

But my demo account can open and close positions as usual.  

 
i4kira:

I am a noob. I don't understand. It means my Internet connection isn't well???

But my demo account can open and close positions as usual.  

It means that your EA was uninitialised because you logged into a different account . . .  so restart your EA.  Maybe this is not the reason that your EA doesn't work on a "Real" account . . .