The following error codes describe scenarios where a trading request passed internal validation by the framework; was sent to the broker; but the broker rejected the request (or failed in some other way).
There are some error codes whose meaning overlaps, or which are very near duplicates (such as
| | Description |
| TR_NOCONNECTION | No current connection to the back-end broker platform |
| TR_CLIENTSIDETIMEOUT | Time-out (client-side, implemented by the framework) while waiting for a response from the back-end broker platform |
| TR_BROKERERROR | General, uncategorised error reported by the back-end broker platform |
| TR_GENERALREJECTION | General, uncategorised rejection reported by the back-end broker platform |
| TR_ACCOUNTSUSPENDED | Trading account is reported as suspended |
| TR_ACCOUNTCLOSED | Trading account is reported as closed |
| TR_NOFUNDS | Too little margin to place the trade |
| TR_MARKETCLOSED | Market is currently closed |
| TR_TOOMANYPENDINGORDERS | Too many open pending orders |
| TR_TOOMANYPOSITIONS | Too many open positions |
| TR_TOOMUCHVOLUME | Too much open volume |
| TR_LONGTRADESONLY | Only long trades are permitted on this market |
| TR_SHORTTRADESONLY | Only short trades are permitted on this market |
| TR_CLOSETRADESONLY | The market is in close-only mode. New orders are not accepted. |
| TR_MARKETSUSPENDED | Trading on this market has been suspended by the broker |
| TR_VOLUMETOOSMALL | Requested trading volume is too small |
| TR_VOLUMETOOLARGE | Requested trading volume is too large |
| TR_VOLUMEINVALID | Requested trading volume is reported as not valid |
| TR_VOLUMEREJECTED | General rejection of the requested trading volume |
| TR_MANDATORYSTOP | Broker requires that the order has a stop-loss |
| TR_ALEADYCLOSED | Request to close an order or trade which is already closed |
| TR_ORDERLOCKED | Order/trade is currently locked by the broker and cannot be modified or closed |
| TR_ORDERMISSING | Request to modify an order or trade which does not exist |
| TR_TOOMANYREQUESTS | Broker rejected the request because the framework is making too many requests |
| TR_INVALIDEXPIRY | Invalid expiry option/value on an order |
| TR_HEDGINGNOTALLOWED | Order would create a hedged trade, and is not permitted by the account |
| TR_MUSTUSEFIFO | Orders must be processed (usually: specifically, closed) in FIFO order on a non-hedging account |
| TR_TOOCLOSETOMODIFY | Back-end system does not allow modification of the order because its entry/exit is too close to the current price |
| TR_PRICEINDICATIVE | Market price is indicative, and cannot be traded against |
| TR_INSTRUCTIONREJECTIONWITHCODE | Platform-specific order rejection |
| TR_REJECTIONWITHCODE | Platform-specific order rejection |
| TR_NOPRICEFORJOB | Unable to obtain a price for executing the order |
| TR_TRIGGERTOOCLOSETOMARKET | Price (typically, entry price on a pending order) is too close to the current market price |
| TR_AUTOTRADINGDISABLEDBYBROKER | MT4/5-specific: the order has been placed via an EA, and automated trading is disabled by the broker |
| TR_MT4ERROR130 | MT4-specific: error #130, which can mean either that the entry price on a pending order is too close to the market price, or that the s/l or t/p on a trade is too close to the current market price, or that the s/l or t/p on a pending order is too close to the requested entry price |
| TR_NOTPENDING | Attempt to delete an ID which is not a pending order |
| TR_MARKETORDERSNOTALLOWED | At-market orders are not allowed on this market |
| TR_LIMITORDERSNOTALLOWED | Limit orders are not allowed on this market |
| TR_STOPORDERSNOTALLOWED | Stop orders are not allowed on this market |
| TR_STOPLIMITORDERSNOTALLOWED | Stop-limit orders are not allowed on this market |
| TR_SLNOTALLOWED | Stop-losses are not allowed on this market |
| TR_TPNOTALLOWED | Take-profits are not allowed on this market |
| TR_ACCOUNTNOTRADINGRIGHTS | Your account does not have trading rights. (Generally implies that the account is not allowed to trade, rather than being logged in with a read-only password.) |