I tried a script (using the same code) and it works fine, but it still refuses when it's the EA (error 4752 !?)
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](/i/community/logo_mql5_small.png)
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
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
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