donewiththedollar / directionalscalper

CCXT based algorithmic trading framework for Bybit and other CCXT supported exchanges
https://quantumvoid.org
MIT License
150 stars 49 forks source link

Stop loss bug #119

Closed alipairon closed 3 days ago

alipairon commented 1 month ago

Using the last pull version.

Errors occurs during stop loss try

2024-09-14 15:03:36 - BybitBaseStrategy - ERROR - [BIGTIMEUSDT] Error during stop-loss attempt for short position: 'LinearGridBaseFutures' object has no attribute 'create_limit_order_bybit'
2024-09-14 14:45:59 - BybitBaseStrategy - ERROR - [COTIUSDT] Error during stop-loss attempt for short position: 'LinearGridBaseFutures' object has no attribute 'create_limit_order_bybit'

And another one I am not sure happening why:

2024-09-14 15:04:41 - BybitBaseStrategy - ERROR - Exception caught in should_replace_grid_updated_buffer_min_outerpricedist_v2: unsupported operand type(s) for -: 'NoneType' and 'float'
Traceback (most recent call last):
  File "/root/directionalscalper2/directionalscalper/core/strategies/bybit/bybit_strategy.py", line 12850, in should_replace_grid_updated_buffer_min_outerpricedist_v2
    price_change_pct_long = abs(current_price - last_reissue_price_long) / last_reissue_price_long * 100.0
                                ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
donewiththedollar commented 1 month ago

Should be resolved but leaving this open for a bit just in case