kuegi / kuegiBot

Crypto trading bot helping me sticking to my strategy.
GNU General Public License v3.0
116 stars 40 forks source link

bad connection on entry trigger creates multiple SL orders #2

Closed kuegi closed 4 years ago

kuegi commented 4 years ago

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.

kuegi commented 4 years ago

hopefully fixed, but couldn't pinpoint the real cause. have to investigate further.