Download MetaTrader 5
To add comments, please log in or register
No time to learn MQL5? The source code library is at your service!
Keith
362
Keith 2013.12.19 19:49 

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
17963
Simon Gniadkowski 2013.12.19 20:19  
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
13624
whroeder1 2013.12.19 20:27  
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
362
Keith 2013.12.19 22:47  
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
17963
Simon Gniadkowski 2013.12.19 22:48  
kminler:

Thanks Raptor, enabled at both locations already.

Does this Broker allow EAs on this type of account ?
Keith
362
Keith 2013.12.19 22:49  
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
28624
Alain Verleyen 2013.12.19 23:04  
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
362
Keith 2013.12.19 23:49  
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
28624
Alain Verleyen 2013.12.19 23:50  
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
362
Keith 2013.12.19 23:53  
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
362
Keith 2013.12.20 00:03  
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