Happened on bitmex. entry got triggered and bot wanted to create SL. mex was overloaded and didn't react. so tried again 30 sec. later (on pos sync). until websocket sent all the order updates at once. -> had multiple SL in the market.
needed fix: on sync: also make sure that each position has only 1 SL in the market. cancel all but the closest SL
possible improv: add new order to the list (like its done for cancelation) so bot assumes its there until next websocket update.
Happened on bitmex. entry got triggered and bot wanted to create SL. mex was overloaded and didn't react. so tried again 30 sec. later (on pos sync). until websocket sent all the order updates at once. -> had multiple SL in the market.
needed fix: on sync: also make sure that each position has only 1 SL in the market. cancel all but the closest SL
possible improv: add new order to the list (like its done for cancelation) so bot assumes its there until next websocket update.