Hello guys, I need some help getting my EA to work properly. The thing is, he can modify positions, but only if I assign the EA to my symbol chart with autotrading ALREADY ENABLED. If I assign the EA to the chart while autotrading is disabled (disabled via the button) and attempt to modify position I get "cannot modify position due to autotrading disabled". If I enable autotrading later on, calls like CTrade.PositionModify() only responds with "CTrade::OrderSend: ... [auto trading disabled by client]". I also made sure that auto trading is allowed in Options/Experts tab. So what am I missing here? Thanks in advance!
- AutoTrading expert advisor
- News filter with DLL on mql5?
- Autotrading problem
nowayfra:
Hello guys, I need some help getting my EA to work properly. The thing is, he can modify positions, but only if I assign the EA to my symbol chart with autotrading ALREADY ENABLED. If I assign the EA to the chart while autotrading is disabled (disabled via the button) and attempt to modify position I get "cannot modify position due to autotrading disabled". If I enable autotrading later on, calls like CTrade.PositionModify() only responds with "CTrade::OrderSend: ... [auto trading disabled by client]". I also made sure that auto trading is allowed in Options/Experts tab. So what am I missing here? Thanks in advance!
Long story, try to make it short
Hello guys, I need some help getting my EA to work properly. The thing is, he can modify positions, but only if I assign the EA to my symbol chart with autotrading ALREADY ENABLED. If I assign the EA to the chart while autotrading is disabled (disabled via the button) and attempt to modify position I get "cannot modify position due to autotrading disabled". If I enable autotrading later on, calls like CTrade.PositionModify() only responds with "CTrade::OrderSend: ... [auto trading disabled by client]". I also made sure that auto trading is allowed in Options/Experts tab. So what am I missing here? Thanks in advance!
nowayfra:
Short:
if button auto trading enabled -> EA start -> CTrade may modify positions -> OK
if button auto trading disabled -> EA start -> button auto trading enabled -> CTrade may NOT modify positions -> NOT OK
Any ideas why?
I think that I am encountering the same behaviour today. Have you found a solution for this?
In my case is PositionClose() not working as I would expect. I get the error message "auto trading disabled by client", even though Buy() and
Sell() work properly.
![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