fix: Add tuple unpacking for check_existing_positions return value

Fixed TypeError caused by missing tuple unpacking:
- check_existing_positions() returns (has_position, position_info)
- Was accessing as dict directly → TypeError
- Now properly unpacks: has_position, position_info = check_existing_positions()

Fixed in:
- activate_enhanced_scoring.py
- Notebook cells 15, 27, 84, 89

Error resolved: TypeError: tuple indices must be integers or slices, not str
This commit is contained in:
2026-01-21 13:37:58 +01:00
parent ccbc5f8d06
commit 1007b904fa
3 changed files with 7 additions and 7 deletions
+1 -1
View File
@@ -54,7 +54,7 @@ def enhanced_trading_check_wrapper(symbol="XAUUSD", debug=False):
try:
# SCHRITT 1: Position Check (wie vorher)
max_positions = TRADING_CONFIG['risk']['max_positions']
position_info = check_existing_positions(symbol)
has_position, position_info = check_existing_positions(symbol)
if position_info['count'] >= max_positions:
if debug: