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

@@ -241,8 +241,11 @@ class LiveRegimeStrategy:
"""
prob = signal.get('probability', 0.5)
# Base size is max_position_usdt
base_size = min(available_usdt, self.config.max_position_usdt)
# Base size: if max_position_usdt <= 0, use all available funds
if self.config.max_position_usdt <= 0:
base_size = available_usdt
else:
base_size = min(available_usdt, self.config.max_position_usdt)
# Scale by probability (1.0x at 0.5 prob, up to 1.6x at 0.8 prob)
scale = 1.0 + (prob - 0.5) * 2.0