fix: Update external config files to use 0.10 lot size
ROOT CAUSE FOUND: User was right - there was an external config file! advanced_position_management.py had hardcoded values: - base_risk = 0.01 (should be 0.02) - return 0.01 fallback (should be 0.10) - No min/max lot enforcement CHANGES: 1. advanced_position_management.py: ✅ base_risk: 0.01 → 0.02 (2% risk) ✅ return fallback: 0.01 → 0.10 ✅ volume_min: max(broker_min, 0.10) ✅ volume_max: min(broker_max, 0.20) 2. session_filter_patch.py: ✅ Added lot sizing config: - min_lot: 0.10 - max_lot: 0.20 - default_lot: 0.10 IMPACT: - Bot will now use 0.10 minimum lot - Adaptive sizing respects 0.10-0.20 range - No more 0.01 lot trades TESTING NEEDED: 1. Restart kernel 2. Reimport advanced_position_management 3. Verify next trade uses 0.10 lot 🎯 Generated with Claude Code Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
a71ecafb0a
commit
2de5f9f53f
4 files changed
+738
-538
No files matched your search
@@ -28,7 +28,7 @@ class AdaptivePositionSizer:
|
||||
"""
|
||||
|
||||
def __init__(self,
|
||||
base_risk: float = 0.01,
|
||||
base_risk: float = 0.02,
|
||||
high_confidence_threshold: float = 80.0,
|
||||
medium_confidence_threshold: float = 70.0,
|
||||
high_multiplier: float = 1.5,
|
||||
@@ -105,7 +105,7 @@ class AdaptivePositionSizer:
|
||||
symbol_info = mt.symbol_info(symbol)
|
||||
if not symbol_info:
|
||||
logger.error(f"Symbol info not available for {symbol}")
|
||||
return 0.01 # Minimum
|
||||
return 0.10 # Minimum
|
||||
|
||||
# Pip Value berechnen
|
||||
point = symbol_info.point
|
||||
@@ -117,8 +117,8 @@ class AdaptivePositionSizer:
|
||||
volume = risk_amount / (stop_loss_distance * pip_value)
|
||||
|
||||
# Auf erlaubte Schritte runden
|
||||
volume_min = symbol_info.volume_min
|
||||
volume_max = symbol_info.volume_max
|
||||
volume_min = max(symbol_info.volume_min, 0.10) # Min: Broker-Min oder 0.10
|
||||
volume_max = min(symbol_info.volume_max, 0.20) # Max: Broker-Max oder 0.20
|
||||
volume_step = symbol_info.volume_step
|
||||
|
||||
volume = round(volume / volume_step) * volume_step
|
||||
@@ -458,7 +458,7 @@ class AdvancedPositionManager:
|
||||
enable_adaptive_sizing: bool = True,
|
||||
enable_trailing_stop: bool = True,
|
||||
enable_partial_tp: bool = True,
|
||||
base_risk: float = 0.01):
|
||||
base_risk: float = 0.02):
|
||||
"""
|
||||
Args:
|
||||
enable_adaptive_sizing: Adaptive Position Sizing aktivieren
|
||||
@@ -550,7 +550,7 @@ print("✅ Advanced Position Management activated!")
|
||||
# Cell: In execute_trade_v2_adaptive()
|
||||
|
||||
# BEFORE (old):
|
||||
volume = 0.01 # Fixed
|
||||
volume = 0.10 # Fixed
|
||||
|
||||
# AFTER (with Adaptive Sizing):
|
||||
if adv_position_mgr.adaptive_sizing:
|
||||
@@ -561,7 +561,7 @@ if adv_position_mgr.adaptive_sizing:
|
||||
symbol=symbol
|
||||
)
|
||||
else:
|
||||
volume = 0.01
|
||||
volume = 0.10
|
||||
|
||||
|
||||
# Cell: Add to Scheduler (for Trailing Stop + Partial TP)
|
||||
|
||||
Reference in new issue
Block a user