Download MetaTrader 5

EA failure due to micro account suffix--GBPJPYm?

To add comments, please log in or register
Keith
368
Keith  

Hi all

Have an ea that works perfectly on regular accounts but generates 4109--"Trade-not allowed" error when micro account requires symbol with "m" added, as in header.

Does anyone know of a work around?

Have confirmed that live trade is checked; unfortunately the broker is in denial mode and I haven't found a solution searching here.

All suggestions appreciated.

Keith

Simon Gniadkowski
Moderator
18037
Simon Gniadkowski  
kminler:

Hi all

Have an ea that works perfectly on regular accounts but generates 4109--"Trade-not allowed" error when micro account requires symbol with "m" added, as in header.

Does anyone know of a work around?

Have confirmed that live trade is checked; unfortunately the broker is in denial mode and I haven't found a solution searching here.

Where ? you can set it in 2 places . . in MT4 and in the EA

whroeder1
16112
whroeder1  
kminler: Have an ea that works perfectly on regular accounts but generates 4109--"Trade-not allowed" error when micro account requires symbol with "m" added, as in header. Does anyone know of a work around?

You code is BROKEN. Most likely it is hard coded to trade "EURUSD" or some other pair, which fails when the symbol form is different. (Broker's use a variety of naming patterns: EURUSD, EURUSDm, EURUSDi, "EURUSD.", "EURUSD..", "EUR.USD", "EUR/USD", "EURUSD.stp", EURUSDct, "EURUSD.G", "EURUSD+", EURUSDpro at least.)

Recode your EA to trade the chart pair (Use NULL not a string for most calls, Symbol() in marketInfo).

Keith
368
Keith  
RaptorUK:

Where ? you can set it in 2 places . . in MT4 and in the EA

Thanks Raptor, enabled at both locations already.

Keith

Simon Gniadkowski
Moderator
18037
Simon Gniadkowski  
kminler:

Thanks Raptor, enabled at both locations already.

Does this Broker allow EAs on this type of account ?
Keith
368
Keith  
WHRoeder:

You code is BROKEN. Most likely it is hard coded to trade "EURUSD" or some other pair, which fails when the symbol form is different. (Broker's use a variety of naming patterns: EURUSD, EURUSDm, EURUSDi, "EURUSD.", "EURUSD..", "EUR.USD", "EUR/USD", "EURUSD.stp", EURUSDct, "EURUSD.G", "EURUSD+", EURUSDpro at least.)

Recode your EA to trade the chart pair (Use NULL not a string for most calls, Symbol() in marketInfo).

Thanks for the suggestion have changed order OrderSend, symbol parameter to NULL from Symbol().

Will update shortly.

Keith

Alain Verleyen
Moderator
33504
Alain Verleyen  
kminler:

Thanks for the suggestion have changed order OrderSend, symbol parameter to NULL from Symbol().

Will update shortly.

Keith

You can also check that trading is allowed on this symbol.

MODE_TRADEALLOWED22Trade is allowed for the symbol.
Keith
368
Keith  
kminler:

Thanks for the suggestion have changed order OrderSend, symbol parameter to NULL from Symbol().

Will update shortly.

Keith

Ok finally forced an attempted trade and now get error 4062 ERR_STRING_PARAMETER_EXPECTED

Not sure why I got that but gives me the idea that maybe I should code the name right into the OrderSend command, will try that and report back.

Keith

Alain Verleyen
Moderator
33504
Alain Verleyen  
kminler:

Ok finally forced an attempted trade and now get error 4062 ERR_STRING_PARAMETER_EXPECTED

Not sure why I got that but gives me the idea that maybe I should code the name right into the OrderSend command, will try that and report back.

Keith

It's better to show a snippet of code.
Keith
368
Keith  
RaptorUK:
Does this Broker allow EAs on this type of account ?

Yes, they advise that they are not blocking the trade, it appears that metatrader is not sending the order, in other words meta trader does not recognise the GBPJPYm as a valid parameter for OrderSend.

As mentioned will insert actual name into OrderSend and see what happens.

Keith
368
Keith  
angevoyageur:

You can also check that trading is allowed on this symbol.

MODE_TRADEALLOWED 22 Trade is allowed for the symbol.
thanks for the idea that will be my next step
12
To add comments, please log in or register