
Any transaction-related operations (OrderSend(), OrderClose(), OrderCloseBy(), OrderDelete() f forexdiscountbrokersexbonusrebate OrderModify() functions) can fail for some reasons and return negative order numbers or FALSE. Each forexrebatesbrokers cashback forex be handled in a different way. The most common errors and suggestions for handling them are as follows: Description of the constant value ERR_NO_ERROR0 Transaction successful ERR_NO_RESULT1 OrderModify() tries to replace the original set value with the same value that should be modified. One or more of these values, and then repeatedly try to modify ERR_COMMON_ERROR2 regular error until the error forex discount brokers detected, all transactions must stop running if the client and trading system must restart ERR_INVALID_TRADE_ parameter 3 invalid parameters, for example, currency pair error, unknown trading operations, non-existent order number, etc. program logic must be modified ERR_SERVER_BUSY4 trade server is busy later please try again ERR_OLD_VERSION5 old version of the client needs to install the latest version of the client ERR_NO_CONNECTION6 trade server is not connected need to confirm that the connection is not disconnected (for example, apply IsConnected function) after a period of time (5 seconds) After that) retry ERR_TOO_FREQUENT_REQUESTS8 transaction requests are too frequent too frequent transaction requests must be reduced, the program logic needs to be modified ERR_ACCOUNT_DISABLED64 account is disabled all running transactions must be stopped ERR_INVALID_ACCOUNT65 account is invalid all running transactions must stop ERR_TRADE_TIMEOUT128 transaction timeout before retry (at least 1 minute) must confirm that the transaction business really did not succeed (the existence of unmodified or undeleted orders) ERR_INVALID_PRICE129 invalid opening price or quoted price later must refresh the data, apply RefreshRates function to retry if the error does not disappear If the error does not disappear, try to stop all running transactions, modify the program logic ERR_INVALID_STOPS130 stop loss and take profit is too close to the current price or price calculation error generally modify the stop loss and take profit distance ERR_INVALID_TRADE_VOLUME131 invalid trading volume try to stop all running transactions, change the program logic ERR_MARKET_ CLOSED132 market closed retry later ERR_TRADE_DISABLED133 trades are prohibited all running trades must be stopped ERR_NOT_ENOUGH_MONEY134 insufficient funds to trade retry later with a small amount of money to make sure there is enough money to complete the trade ERR_PRICE_CHANGED135 Price has changed, apply RefreshRates() function to retry ERR_OFF_QUOTES136 no quotes no quotes due to a variety of reasons, traders do not provide prices or refuse to provide prices (lets say, the price of this trade has not started, the price is uncertain, the market is changing too quickly) after a delay of 5 seconds, it is necessary to use the RefreshRates function to update data, and then retry ERR_REQUOTE138 requested quote is out of date, or the bid and ask price confusion after a delay of 5 seconds, it is necessary to use RefreshRates () function to refresh the data retry again if the error still does not disappear, try to stop all running transactions, modify the program ERR_ORDER_LOCKED139 transaction orders are locked, is processing In try to stop all running transactions, modify the program logic ERR_LONG_POSITIONS_ONLY_ALLOWED140 buy only prohibited sell ERR_TOO_MANY_REQUESTS141 too many requests must reduce the number of requests, the program logic needs to be modified 142 orders in order it is not an error, but a code between the client and the trade server. It is not an error, but a code between the client and the trade server that occurs very rarely when the connection happens to be disconnected or reconnected during the execution of a trade This code is handled in the same way as error code 128 143 The order has already been executed and accepted by the trader It is not an error, but a code between the client and the trade server It occurs for the same reason as code 142 and is handled Refer to error 128 144 during manual confirmation, the order has been abandoned by the client it is not an error, but a code between the client and the trade server ERR_TRADE_MODIFY_DENIED 145 because the order is too close to the market price or is locked, the modification is denied after a delay of 15 seconds, update the data with the RefreshRates function Retry again ERR_TRADE_CONTEXT_BUSY146 trading thread busy only after IsTradeContextBusy() function returns FALSE Retry ERR_TRADE_EXPIRATION_DENIED147 trader negated pending order expired use if the period is zero, the transaction can be retried ERR_ TRADE_TOO_MANY_ORDERS148 The total number of open and pending trades has reached the limit set by the broker only after the existing positions are closed or pending orders are deleted before new positions can be opened or pending ERR_TRADE_HEDGE_PROHIBITED149 When the hedging function is closed, an attempt to open an order opposite to an existing position must first Close the existing position, stop all such trading operations or modify the program logic ERR_TRADE_PROHIBITED_BY_FIFO150 attempt to close an order that violates the FIFO rule first close the previous position, stop all such trading operations or modify the program logic