I could be wrong, but is it possible side does not get set to 1 in case of a long position in handle_signal on line 274? I noticed this after trades exited very fast in most situations.
Possible solution:
...
market_price = get_market_price(client, _market=market)
in_position = True
if order_side == "BUY":
side = 1
else:
side = -1
singlePrint(f"{order_side}: {qty} ${market_price} using x{leverage} leverage", std)
...
https://github.com/Hephyrius/binance_futures_bot/blob/41f6d354f9b383dda32ea927e893d074e8130f07/bot_functions.py#L222
I could be wrong, but is it possible
side
does not get set to 1 in case of a long position inhandle_signal
on line 274? I noticed this after trades exited very fast in most situations.Possible solution: