OrderSend retcode 10044 on one symbol: Close Only mode and how an EA reacts
Posted: Sat Oct 24, 2026 7:52 pm
OrderSend retcode 10044 on one symbol: Close Only mode and how an EA reacts
An EA that loops over a list of symbols can get stuck on one the broker has switched to Close Only. Brokers can do that for an expiring contract or a symbol being delisted. Every new entry then comes back from OrderSend with retcode 10044, TRADE_RETCODE_CLOSE_ONLY, which means only position closing is allowed. Its neighbours are 10042 for long only and 10043 for short only.
If the EA treats every retcode other than 10009 as a temporary fault and retries on each tick, it sends a doomed request on every tick until someone notices.
Reading the mode before sending is cleaner:
long mode = SymbolInfoInteger(sym, SYMBOL_TRADE_MODE);
if(mode == SYMBOL_TRADE_MODE_DISABLED || mode == SYMBOL_TRADE_MODE_CLOSEONLY) return;
bool canBuy = (mode == SYMBOL_TRADE_MODE_FULL || mode == SYMBOL_TRADE_MODE_LONGONLY);
bool canSell = (mode == SYMBOL_TRADE_MODE_FULL || mode == SYMBOL_TRADE_MODE_SHORTONLY);
Closing still works in Close Only, so the exit logic should keep running for positions that are already open. A symbol can also go back to Full access later, so the check belongs inside the entry path each time, not in a flag set once at start. With twenty symbols, keep the mode per symbol, since one going Close Only should not silence the other nineteen.
An EA that loops over a list of symbols can get stuck on one the broker has switched to Close Only. Brokers can do that for an expiring contract or a symbol being delisted. Every new entry then comes back from OrderSend with retcode 10044, TRADE_RETCODE_CLOSE_ONLY, which means only position closing is allowed. Its neighbours are 10042 for long only and 10043 for short only.
If the EA treats every retcode other than 10009 as a temporary fault and retries on each tick, it sends a doomed request on every tick until someone notices.
Reading the mode before sending is cleaner:
long mode = SymbolInfoInteger(sym, SYMBOL_TRADE_MODE);
if(mode == SYMBOL_TRADE_MODE_DISABLED || mode == SYMBOL_TRADE_MODE_CLOSEONLY) return;
bool canBuy = (mode == SYMBOL_TRADE_MODE_FULL || mode == SYMBOL_TRADE_MODE_LONGONLY);
bool canSell = (mode == SYMBOL_TRADE_MODE_FULL || mode == SYMBOL_TRADE_MODE_SHORTONLY);
Closing still works in Close Only, so the exit logic should keep running for positions that are already open. A symbol can also go back to Full access later, so the check belongs inside the entry path each time, not in a flag set once at start. With twenty symbols, keep the mode per symbol, since one going Close Only should not silence the other nineteen.