Update trading configuration to allow full fund utilization and adjust base size calculation in strategy

- Changed `max_position_usdt` to -1.0 to indicate that all available funds should be used if the value is less than or equal to zero.
- Modified the base size calculation in `LiveRegimeStrategy` to accommodate the new logic for `max_position_usdt`, ensuring it uses all available funds when applicable.
This commit is contained in:
2026-01-15 10:40:43 +08:00
parent 0c82c4f366
commit c4ecb29d4c
3 changed files with 7 additions and 4 deletions

View File

@@ -65,7 +65,7 @@ class TradingConfig:
candles_to_fetch: int = 500 # Enough for feature calculation
# Position sizing
max_position_usdt: float = 1000.0 # Max position size in USDT
max_position_usdt: float = -1.0 # Max position size in USDT. If <= 0, use all available funds
min_position_usdt: float = 10.0 # Min position size in USDT
leverage: int = 1 # Leverage (1x = no leverage)
margin_mode: str = "cross" # "cross" or "isolated"