EA failure due to micro account suffix--GBPJPYm?

 

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

 
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

 
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).

 
RaptorUK:

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

Thanks Raptor, enabled at both locations already.

Keith

 
kminler:

Thanks Raptor, enabled at both locations already.

Does this Broker allow EAs on this type of account ?
 
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

 
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.
 
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

 
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.
 
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.

 
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