fix: Remove duplicate has_position in get_position_summary

Fixed ValueError in cells 15 and 27:
- Was: has_position, has_position, position_info = ... (3 vars, 2 values)
- Now: has_position, position_info = ... (2 vars, 2 values)

Error resolved: ValueError: not enough values to unpack (expected 3, got 2)
This commit is contained in:
cbazza committed 2026-01-21 13:48:58 +01:00
1 parent 1007b904fa
commit 2c60675644
1 file changed
+12 -4
@@ -579,7 +579,7 @@
"\n", "\n",
"def get_position_summary(symbol=\"XAUUSD\", strategy_name=\"TradingBot_V1.6\"):\n", "def get_position_summary(symbol=\"XAUUSD\", strategy_name=\"TradingBot_V1.6\"):\n",
" \"\"\"Position-Zusammenfassung\"\"\"\n", " \"\"\"Position-Zusammenfassung\"\"\"\n",
" has_position, has_position, position_info = check_existing_positions(symbol, strategy_name)\n", " has_position, position_info = check_existing_positions(symbol, strategy_name)\n",
" \n", " \n",
" print(f\"\\n📊 POSITION SUMMARY für {symbol} (V1.6 Adaptive Complete)\")\n", " print(f\"\\n📊 POSITION SUMMARY für {symbol} (V1.6 Adaptive Complete)\")\n",
" print(\"=\" * 60)\n", " print(\"=\" * 60)\n",
@@ -608,7 +608,7 @@
" ✅ KORRIGIERT: Schließt bestehende Positionen (optional)\n", " ✅ KORRIGIERT: Schließt bestehende Positionen (optional)\n",
" Diese Funktion fehlte in der ursprünglichen V1.6!\n", " Diese Funktion fehlte in der ursprünglichen V1.6!\n",
" \"\"\"\n", " \"\"\"\n",
" has_position, has_position, position_info = check_existing_positions(symbol, strategy_name)\n", " has_position, position_info = check_existing_positions(symbol, strategy_name)\n",
" \n", " \n",
" if not has_position:\n", " if not has_position:\n",
" print(\"✅ Keine Positionen zum Schließen\")\n", " print(\"✅ Keine Positionen zum Schließen\")\n",
@@ -1195,7 +1195,7 @@
" \n", " \n",
" # SCHRITT 1: POSITION CHECK\n", " # SCHRITT 1: POSITION CHECK\n",
" print(f\"\\n🔍 POSITION CHECK für {symbol} (V1.6 Adaptive Complete)\")\n", " print(f\"\\n🔍 POSITION CHECK für {symbol} (V1.6 Adaptive Complete)\")\n",
" has_position, has_position, position_info = check_existing_positions(symbol, strategy_name)\n", " has_position, position_info = check_existing_positions(symbol, strategy_name)\n",
" \n", " \n",
" if has_position and position_info['count'] >= max_positions:\n", " if has_position and position_info['count'] >= max_positions:\n",
" if debug:\n", " if debug:\n",
@@ -2405,7 +2405,15 @@
"cell_type": "code", "cell_type": "code",
"execution_count": null, "execution_count": null,
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"2026-01-21 13:46:48,941 - INFO - HTTP Request: POST https://api.telegram.org/bot7783303065:AAHVVvwWGqmhJ2BVq8LqkLRSsicKy1CUsD8/getUpdates \"HTTP/1.1 200 OK\"\n"
]
}
],
"source": [ "source": [
"# ✅ KORRIGIERT: Umfassende Testing Suite (fehlte in V1.6)\n", "# ✅ KORRIGIERT: Umfassende Testing Suite (fehlte in V1.6)\n",
"\n", "\n",