Download MetaTrader 5

my EA doesn't want to trade anymore

To add comments, please log in or register
Daniel Thouvignon
38
Daniel Thouvignon  

Hello everyone,

When sending a TradeRequest, my EA now always returns the error 4752 (Trading by Expert Advisors prohibited) and the retcode =10027 (Autotrading disabled by client terminal).

Still, the "Options/ExpertAdvisor/Allow Auto Trading" is well checked and the 3 cases of "Disable Auto Trading" are unchecked.

A reboot doesn't  help. I don't understand what going on.

Maybe you have an idea ?

Thank you in advance.

Daniel

Daniel Thouvignon
38
Daniel Thouvignon  

I tried a script (using the same code) and it works fine, but it still refuses when it's the EA (error 4752 !?)
onewithzachy
2269
onewithzachy  

Hi danielthv,

I have MT with MetaQuotes server. Now my EA can't trade but script can. I think MQ wants to run ATC trouble free. That was just my opinion, I didn't check with other broker server.

However I don't understand your retcode 10027, did you click the auto trading button on MT toolbar ?

 

Daniel Thouvignon
38
Daniel Thouvignon  
onewithzachy:

Hi danielthv,

I have MT with MetaQuotes server. Now my EA can't trade but script can. I think MQ wants to run ATC trouble free. That was just my opinion, I didn't check with other broker server.

However I don't understand your retcode 10027, did you click the auto trading button on MT toolbar ?

 

Thank you for your reply.

if temres is a MqlTradeResult type variable, temres.retcode is what is returned after an Ordersend command is placed.

However, it works again when I tried it this morning (probably Metaquotes did something on their side)

Daniel

Documentation on MQL5: Standard Constants, Enumerations and Structures / Data Structures / Structure of a Trade Request Result
Documentation on MQL5: Standard Constants, Enumerations and Structures / Data Structures / Structure of a Trade Request Result
  • www.mql5.com
Standard Constants, Enumerations and Structures / Data Structures / Structure of a Trade Request Result - Documentation on MQL5
To add comments, please log in or register