I sometimes lose orders and positions appear to be frozen in the exchange, what should I do in this case?

: General errors

For this purpose, the MoonBot terminal has a hanged position tracking feature that is available only in the PRO version.
The Control hanged position function is enabled in Settings-Advanced-Hang Control and can be configured as follows:

1) The Control orders of this bot should be ticked on the working bot, optionally for ping control in the Control VDS IP field, set the IP of the VDS with the tracking bot.

2) Setting up tracking bots:
You need to open the UDP port specified in the bot in the line “Open UDP port 2704 in the VDS with control bot”. Warning! Spot and different futures pairs use different ports. These ports are used for ping control.
Then you need to fill in the table of API keys from the worker bots. API keys must be from different exchange accounts! If you enter API keys from the same account in two lines, the bot will not be able to correctly determine which account should be managed and will mark both lines with API keys in the Status column as duplicate.
If API keys are entered incorrectly, or no rights are set for them, or IP whitelist, the “Status” column will show an error.
The “O” checkbox in the table is responsible for controlling orders by time of existence (Time, s column) and by distance to the current price (Price, % column). The order will be cancelled after reaching the specified time or approaching the specified price distance.
The “P” checkbox is responsible for position control. If it is enabled, the bot will detect positions hanging without take-outs and report about them in Telegram, and with AutoSell ticked, it will also automatically sell. In the “Dont control these balances” field you can set the Black List of coins excluded from the position control algorithm. The default coins are: BTC, ETH, BNB, USDP, TUSD, TUSD, USDC, USDT, BUSD, GBP, USD, RUB, EUR, HT, HUSD, TRY.
Auto-selling is performed by a special manual strategy called “SafeGuard” – this strategy is created automatically at the first such sale, after which you can edit its settings.
The IP tick is responsible for ping control. If the IP of the tracking bot is correctly set in the working bot, and if the ping does not pass within 10 seconds, then orders to open positions will be cancelled (this does not apply to take trades, the algorithm of controlling hung positions does not cancel take trades).

3) Number of tracking bots:
For spot: 1 bot monitors all accounts (and will cancel orders for all pairs; look for and sell hover positions for the base currency it works on).
For futures: 1 bot for each market (it will cancel orders and search for hovering positions only for the market on which it works).

Total number of tracking bots required is as follows:
1 bot tracking the spot market of Binance exchange
1 bot tracking the USDT futures market on Binance exchange
1 bot tracking the Binance quarter market
1 bot tracking the spot market on Huobi exchange
1 bot tracking the spot market on Bybit exchange
1 bot tracking the futures market on Bybit exchange
1 bot tracking the spot market on Gate exchange
1 bot tracking the futures market on Gate exchange

20-30 API keys can be inserted into each tracking bot. A larger number of entered keys can lead to an API ban at the moment when the bot starts cancelling all orders on all accounts at once; therefore, if there are more than 30 accounts, it is required to additionally separate the tracking bots on different servers, as the API load is counted by server IP and so that each bot has no more than 30 API keys.