Expert Advisor sometimes not setting SL and TP in live account

 

I have an expert advisor which in demo accounts 'always' sets SL and TP... but when in live, sometime it doesn't set the SL and TP.

Should this be a problem with the EA or with the broker?

 
jankrafka:

I have an expert advisor which in demo accounts 'always' sets SL and TP... but when in live, sometime it doesn't set the SL and TP.

Should this be a problem with the EA or with the broker?

Start looking at the logs Journal & Expert. I guess the spread is big and the stops too close - but this tells you the logs.
 
jankrafka: I have an expert advisor which in demo accounts 'always' sets SL and TP... but when in live, sometime it doesn't set the SL and TP. Should this be a problem with the EA or with the broker?

It's probably the EA that is not properly checking and adjusting for the Stops Levels and Freeze Levels of the broker's symbol contract.

  • If this is a Market EA, then request that the author fix it.
  • If it's not from the market but you don't have the source, then you will have to manually compensate via the EA parameters if possible.
  • If you have the source code then have it fixed.
In all cases, look at the logs as suggested in the previous post. That will help you identify if it is the case or something else.
 
appreciate your help...
 

this is what logs are showing when a trade fails to set SL&TP (again, this is sporadic for same EA and the trade is actually opened only without SL&TP):

Request.sl = 0.0 **
Request.tp = 0.0 **
Request.deviation = 1

Request.type = ORDER_TYPE_BUY (0)

Request.type_filling = ORDER_FILLING_IOC (1)
Request.type_time = ORDER_TIME_GTC (0)
Request.expiration = 1970.01.01 00:00:00
Request.position = 0
Request.position_by = 0
Result.retcode = 10027
Result.deal = 0
Result.order = 0
Result.volume = 0.0
Result.price = 0.0
Result.bid = 0.0
Result.ask = 0.0
Result.comment = AutoTrading disabled by client 0.006 ms
Result.request_id = 0
Result.retcode_external = 0

10027

TRADE_RETCODE_CLIENT_DISABLES_AT

Autotrading disabled by client terminal


has anyone seen this before?

Reason: