diff --git a/TradingBot_V1.6_Adaptive_Complete_CORRECTED.ipynb b/TradingBot_V1.6_Adaptive_Complete_CORRECTED.ipynb index 07045d4..927bdaa 100644 --- a/TradingBot_V1.6_Adaptive_Complete_CORRECTED.ipynb +++ b/TradingBot_V1.6_Adaptive_Complete_CORRECTED.ipynb @@ -164,9 +164,23 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 4, "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "βœ… TRADING CONFIGURATION LOADED\n", + "\n", + "πŸ“Š Lot Sizing: 0.1 - 0.2 lots\n", + "⚠️ Max Risk: 2.0% per trade\n", + "🎯 Confidence Threshold: 70%\n", + "πŸ›‘οΈ News Filter: ENABLED\n", + "🌍 Primary Symbol: XAUUSD\n" + ] + } + ], "source": [ "# ============================================================================\n", "# CENTRALIZED TRADING CONFIGURATION\n", @@ -276,7 +290,7 @@ }, { "cell_type": "code", - "execution_count": 4, + "execution_count": 5, "metadata": {}, "outputs": [ { @@ -442,7 +456,7 @@ }, { "cell_type": "code", - "execution_count": 5, + "execution_count": 6, "metadata": {}, "outputs": [ { @@ -457,12 +471,12 @@ "\n", "\n", "╔════════════════════════════════════════════════════════╗\n", - "β•‘ ADAPTIVE RHYTHM STATUS - 12:17:23 UTC β•‘\n", + "β•‘ ADAPTIVE RHYTHM STATUS - 13:36:20 UTC β•‘\n", "╠════════════════════════════════════════════════════════╣\n", "β•‘ Aktuelles Intervall: 5 Minuten β•‘\n", "β•‘ Trading Session: LONDON β•‘\n", "β•‘ VolatilitΓ€tslevel: MEDIUM β•‘\n", - "β•‘ ATR (H1): 14.83 β•‘\n", + "β•‘ ATR (H1): 14.71 β•‘\n", "╠════════════════════════════════════════════════════════╣\n", "β•‘ INTERVALL-SCHEMA: β•‘\n", "β•‘ β€’ Overlap (13-16 UTC): 5-15 Min (aktivste Phase) β•‘\n", @@ -499,7 +513,7 @@ }, { "cell_type": "code", - "execution_count": 6, + "execution_count": 7, "metadata": {}, "outputs": [ { @@ -549,17 +563,17 @@ }, { "cell_type": "code", - "execution_count": 7, + "execution_count": 8, "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ - "2026-01-14 12:17:24,380 - INFO - 🎯 Advanced Position Manager initialized\n", - "2026-01-14 12:17:24,381 - INFO - Adaptive Sizing: βœ…\n", - "2026-01-14 12:17:24,382 - INFO - Trailing Stop: βœ…\n", - "2026-01-14 12:17:24,382 - INFO - Partial TP: βœ…\n" + "2026-01-14 13:36:21,503 - INFO - 🎯 Advanced Position Manager initialized\n", + "2026-01-14 13:36:21,504 - INFO - Adaptive Sizing: βœ…\n", + "2026-01-14 13:36:21,505 - INFO - Trailing Stop: βœ…\n", + "2026-01-14 13:36:21,506 - INFO - Partial TP: βœ…\n" ] }, { @@ -618,7 +632,7 @@ }, { "cell_type": "code", - "execution_count": 8, + "execution_count": 9, "metadata": {}, "outputs": [ { @@ -666,7 +680,7 @@ }, { "cell_type": "code", - "execution_count": 9, + "execution_count": 10, "metadata": {}, "outputs": [ { @@ -798,7 +812,7 @@ }, { "cell_type": "code", - "execution_count": 10, + "execution_count": 11, "metadata": {}, "outputs": [ { @@ -883,7 +897,7 @@ }, { "cell_type": "code", - "execution_count": 11, + "execution_count": 12, "metadata": {}, "outputs": [ { @@ -1005,7 +1019,7 @@ }, { "cell_type": "code", - "execution_count": 12, + "execution_count": 13, "metadata": {}, "outputs": [ { @@ -1197,7 +1211,7 @@ }, { "cell_type": "code", - "execution_count": 13, + "execution_count": 14, "metadata": {}, "outputs": [ { @@ -1257,60 +1271,60 @@ }, { "cell_type": "code", - "execution_count": 14, + "execution_count": 15, "metadata": {}, "outputs": [], "source": [ - "def calculate_position_size(self, symbol, stop_loss_pips, max_risk_per_trade=None):", - " \"\"\"", - " Berechnet die Positionsgrâße basierend auf Risiko", - " \"\"\"", - " if max_risk_per_trade is None:", - " max_risk_per_trade = TRADING_CONFIG[\"risk\"][\"max_risk_per_trade\"]", - " ", - " account_info = mt.account_info()", - " if not account_info:", - " print(f\"⚠️ Keine Account-Info verfΓΌgbar, verwende Minimum-Lot\")", - " return TRADING_CONFIG[\"lot_sizing\"][\"default_lot\"]", - " ", - " balance = account_info.balance", - " risk_amount = balance * max_risk_per_trade", - " ", - " # Symbol-Info holen", - " symbol_info = mt.symbol_info(symbol)", - " if not symbol_info:", - " print(f\"⚠️ Keine Symbol-Info fΓΌr {symbol}, verwende Minimum-Lot\")", - " return TRADING_CONFIG[\"lot_sizing\"][\"default_lot\"]", - " ", - " # Pip-Wert berechnen", - " point = symbol_info.point", - " tick_value = symbol_info.trade_tick_value", - " tick_size = symbol_info.trade_tick_size", - " ", - " # Volume berechnen", - " pip_value = (tick_value / tick_size) * point", - " volume = risk_amount / (stop_loss_pips * pip_value)", - " ", - " # Auf erlaubte Volumenschritte runden", - " volume_min = symbol_info.volume_min", - " volume_max = symbol_info.volume_max", - " volume_step = symbol_info.volume_step", - " ", - " volume = round(volume / volume_step) * volume_step", - " volume = max(volume_min, min(volume_max, volume))", - " ", - " print(f\"πŸ’° Position Sizing fΓΌr {symbol}:\")", - " print(f\" Balance: ${balance:.2f}\")", - " print(f\" Risiko: ${risk_amount:.2f} ({max_risk_per_trade*100}%)\")", - " print(f\" Stop Loss: {stop_loss_pips:.2f} Pips\")", - " print(f\" Berechnetes Volume: {volume:.2f} Lots\")", - " ", + "def calculate_position_size(self, symbol, stop_loss_pips, max_risk_per_trade=None):\n", + " \"\"\"\n", + " Berechnet die Positionsgrâße basierend auf Risiko\n", + " \"\"\"\n", + " if max_risk_per_trade is None:\n", + " max_risk_per_trade = TRADING_CONFIG[\"risk\"][\"max_risk_per_trade\"]\n", + " \n", + " account_info = mt.account_info()\n", + " if not account_info:\n", + " print(f\"⚠️ Keine Account-Info verfΓΌgbar, verwende Minimum-Lot\")\n", + " return TRADING_CONFIG[\"lot_sizing\"][\"default_lot\"]\n", + " \n", + " balance = account_info.balance\n", + " risk_amount = balance * max_risk_per_trade\n", + " \n", + " # Symbol-Info holen\n", + " symbol_info = mt.symbol_info(symbol)\n", + " if not symbol_info:\n", + " print(f\"⚠️ Keine Symbol-Info fΓΌr {symbol}, verwende Minimum-Lot\")\n", + " return TRADING_CONFIG[\"lot_sizing\"][\"default_lot\"]\n", + " \n", + " # Pip-Wert berechnen\n", + " point = symbol_info.point\n", + " tick_value = symbol_info.trade_tick_value\n", + " tick_size = symbol_info.trade_tick_size\n", + " \n", + " # Volume berechnen\n", + " pip_value = (tick_value / tick_size) * point\n", + " volume = risk_amount / (stop_loss_pips * pip_value)\n", + " \n", + " # Auf erlaubte Volumenschritte runden\n", + " volume_min = symbol_info.volume_min\n", + " volume_max = symbol_info.volume_max\n", + " volume_step = symbol_info.volume_step\n", + " \n", + " volume = round(volume / volume_step) * volume_step\n", + " volume = max(volume_min, min(volume_max, volume))\n", + " \n", + " print(f\"πŸ’° Position Sizing fΓΌr {symbol}:\")\n", + " print(f\" Balance: ${balance:.2f}\")\n", + " print(f\" Risiko: ${risk_amount:.2f} ({max_risk_per_trade*100}%)\")\n", + " print(f\" Stop Loss: {stop_loss_pips:.2f} Pips\")\n", + " print(f\" Berechnetes Volume: {volume:.2f} Lots\")\n", + " \n", " return volume" ] }, { "cell_type": "code", - "execution_count": 15, + "execution_count": 16, "metadata": {}, "outputs": [ { @@ -1319,7 +1333,7 @@ "0.01" ] }, - "execution_count": 15, + "execution_count": 16, "metadata": {}, "output_type": "execute_result" } @@ -1331,7 +1345,7 @@ }, { "cell_type": "code", - "execution_count": 16, + "execution_count": 17, "metadata": {}, "outputs": [ { @@ -1343,213 +1357,213 @@ } ], "source": [ - "def execute_trade_v2_adaptive(", - " symbol=None,", - " atr_mult=None,", - " base_confidence=None,", - " max_risk_per_trade=None,", - " risk_filter=True,", - " min_atr=0.0008,", - " use_pullback_entry=False, # DISABLED", - " max_positions=None,", - " strategy_name=\"TradingBot_V1.6\",", - " debug=True", - "):", - " \"\"\"", - " V1.6 Adaptive Complete Trade-AusfΓΌhrung:", - " - Position Control", - " - Relaxed Parameter", - " - Adaptive Rhythm Integration", - " \"\"\"", - " ", - " # ========================================================================", - " # LOAD DEFAULTS FROM TRADING_CONFIG", - " # ========================================================================", - " if symbol is None:", - " symbol = TRADING_CONFIG[\"symbols\"][\"primary\"]", - " if atr_mult is None:", - " atr_mult = TRADING_CONFIG[\"atr\"][\"base_multiplier\"]", - " if base_confidence is None:", - " base_confidence = TRADING_CONFIG[\"confidence\"][\"base_threshold\"]", - " if max_risk_per_trade is None:", - " max_risk_per_trade = TRADING_CONFIG[\"risk\"][\"max_risk_per_trade\"]", - " if max_positions is None:", - " max_positions = TRADING_CONFIG[\"risk\"][\"max_positions\"]", - " ", - " ", - " # SCHRITT 1: POSITION CHECK", - " print(f\"\\nπŸ” POSITION CHECK fΓΌr {symbol} (V1.6 Adaptive Complete)\")", - " has_position, position_info = check_existing_positions(symbol, strategy_name)", - " ", - " if has_position and position_info['count'] >= max_positions:", - " if debug:", - " print(f\"πŸ›‘ TRADE BLOCKIERT: {position_info['count']}/{max_positions} Positionen aktiv\")", - " for pos in position_info['details']:", - " profit_emoji = \"🟒\" if pos['profit'] >= 0 else \"πŸ”΄\"", - " print(f\" {pos['type']} @ {pos['price_open']} | {profit_emoji} {pos['profit']:.2f}\")", - " return None", - " ", - " print(f\"βœ… Position-Check OK: {position_info['count']}/{max_positions}\")", - " ", - " # SCHRITT 2: Signal Analysis", - " signal_info = extended_top_down_v2_adaptive(symbol)", - " if signal_info is None:", - " print(\"❌ Signal-Analyse fehlgeschlagen\")", - " return None", - " ", - " entry_signal = signal_info[\"entry_signal\"]", - " confidence = signal_info[\"confidence\"]", - " adaptive_threshold = signal_info[\"adaptive_threshold\"]", - " signal_quality = signal_info[\"signal_quality\"]", - " market_regime = signal_info[\"market_regime\"]", - " ", - " # SCHRITT 3: Get Price/ATR", - " m5_info = signal_info[\"trend_info\"][\"M5\"]", - " price = m5_info[\"price\"]", - " atr = m5_info[\"atr\"]", - " ", - " # SCHRITT 4: Pre-checks", - " reason = \"\"", - " ", - " if confidence < adaptive_threshold:", - " reason = f\"Confidence {confidence}% < threshold {adaptive_threshold}%\"", - " elif entry_signal == 0:", - " reason = f\"No entry signal\"", - " elif price is None or atr is None:", - " reason = \"Price/ATR not available\"", - " elif risk_filter and atr < min_atr:", - " reason = f\"ATR {atr:.5f} < min_atr {min_atr}\"", - " else:", - " risk_ok = check_risk_limits(symbol, max_risk_per_trade=max_risk_per_trade)", - " if not risk_ok:", - " reason = \"Risk limits exceeded\"", - " ", - " # SCHRITT 5: Execute Trade", - " if not reason:", - " # Final Position Check", - " final_check, _ = check_existing_positions(symbol, strategy_name)", - " if final_check:", - " print(f\"πŸ›‘ Position wurde zwischen Checks erΓΆffnet!\")", - " return None", - " ", - " # SL/TP Calculation", - " regime_mult = 1.0", - " if market_regime['regime'] == 'volatile':", - " regime_mult = 1.2", - " elif market_regime['regime'] == 'ranging':", - " regime_mult = 0.9", - " ", - " adjusted_atr_mult = atr_mult * regime_mult", - " ", - " if entry_signal == 1: # Long", - " stop_loss = price - adjusted_atr_mult * atr", - " take_profit = price + adjusted_atr_mult * atr * 2.5", - " else: # Short", - " stop_loss = price + adjusted_atr_mult * atr", - " take_profit = price - adjusted_atr_mult * atr * 2.5", - " ", - " # Position Sizing", - " account_info = mt.account_info()", - " if account_info:", - " balance = account_info.balance", - " risk_amount = balance * max_risk_per_trade", - " if symbol == \"XAUUSD\":", - " # 🎯 ADAPTIVE POSITION SIZING", - " if 'adv_position_mgr' in globals() and adv_position_mgr.adaptive_sizing:", - " volume = adv_position_mgr.adaptive_sizing.calculate_position_size(", - " confidence=confidence,", - " balance=balance,", - " stop_loss_distance=adjusted_atr_mult * atr * 10000, # Convert to pips", - " symbol=symbol", - " )", - " else:", - " volume = round(min(TRADING_CONFIG[\"lot_sizing\"][\"max_lot\"], max(TRADING_CONFIG[\"lot_sizing\"][\"min_lot\"], risk_amount / (adjusted_atr_mult * atr * 100))),2)", - " else:", - " volume = TRADING_CONFIG[\"lot_sizing\"][\"default_lot\"]", - " else:", - " volume = TRADING_CONFIG[\"lot_sizing\"][\"default_lot\"]", - " ", - " # Log Trade Info", - " print(f\"\\nπŸš€ V1.6 ADAPTIVE COMPLETE TRADE EXECUTION\")", - " print(f\"Direction: {'LONG' if entry_signal == 1 else 'SHORT'}\")", - " print(f\"Price: {price:.5f} | Volume: {volume:.2f}\")", - " print(f\"SL: {stop_loss:.5f} | TP: {take_profit:.5f}\")", - " print(f\"Confidence: {confidence}% | Quality: {signal_quality.upper()}\")", - " print(f\"Regime: {market_regime['regime'].upper()}\")", - " print(f\"Adaptive Interval: {signal_info['adaptive_interval']} min\")", - " print(f\"Session: {signal_info['session'].upper()}\")", - " ", - " # Execute", - " try:", - " order_result = market_order(", - " symbol=symbol,", - " volume=volume,", - " order_type=\"buy\" if entry_signal == 1 else \"sell\",", - " stoploss=stop_loss,", - " take_profit=take_profit", - " )", - " ", - " if order_result and order_result.retcode == mt.TRADE_RETCODE_DONE:", - " print(f\"βœ… Trade erfolgreich! Ticket: {order_result.order}\")", - " ", - " # ==========================================", - " # LOG TRADE ENTRY (V1.8)", - " # ==========================================", - " try:", - " # Hole Position Info", - " positions = mt.positions_get(symbol=symbol)", - " if positions and infra:", - " position = positions[0]", - "", - " # Erstelle Trade Data", - " trade_data = {", - " 'ticket': position.ticket,", - " 'position_id': position.identifier,", - " 'symbol': symbol,", - " 'strategy_name': strategy_name,", - " 'type': 'BUY' if entry_signal == 1 else 'SELL',", - " 'volume': volume,", - " 'entry_price': position.price_open,", - " 'sl_price': position.sl,", - " 'tp_price': position.tp,", - " 'entry_time': datetime.now().strftime('%Y-%m-%d %H:%M:%S'),", - " 'session': rhythm_manager.get_current_session(),", - " 'regime': market_regime['regime'],", - " 'quality': signal_quality,", - " 'confidence': confidence if 'confidence' in locals() else None,", - " 'timeframe_alignment': signal_info.get('required_alignment', 2),", - " 'risk_amount': risk_amount if 'risk_amount' in locals() else None,", - " 'risk_pct': max_risk_per_trade", - " }", - "", - " # Log to Database + Send Telegram", - " infra.log_trade_entry(trade_data)", - " logger.info(\"πŸ“± Trade logged to DB + Telegram notification sent\")", - "", - " except Exception as e:", - " logger.error(f\"⚠️ Infrastructure logging failed: {e}\")", - " # ==========================================", - "", - "", - " # Verify & Log", - " new_check, new_info = check_existing_positions(symbol, strategy_name)", - " print(f\"πŸ“Š Positionen: {new_info['count']}\")", - " log_trade_performance_adaptive(signal_info, order_result)", - " else:", - " print(f\"❌ Trade failed: {order_result.comment if order_result else 'No result'}\")", - " ", - " return order_result", - " ", - " except Exception as e:", - " print(f\"❌ Execution failed: {e}\")", - " return None", - " ", - " else:", - " if debug:", - " print(f\"\\n⏸️ TRADE SKIPPED: {reason}\")", - " return None", - "", - "", + "def execute_trade_v2_adaptive(\n", + " symbol=None,\n", + " atr_mult=None,\n", + " base_confidence=None,\n", + " max_risk_per_trade=None,\n", + " risk_filter=True,\n", + " min_atr=0.0008,\n", + " use_pullback_entry=False, # DISABLED\n", + " max_positions=None,\n", + " strategy_name=\"TradingBot_V1.6\",\n", + " debug=True\n", + "):\n", + " \"\"\"\n", + " V1.6 Adaptive Complete Trade-AusfΓΌhrung:\n", + " - Position Control\n", + " - Relaxed Parameter\n", + " - Adaptive Rhythm Integration\n", + " \"\"\"\n", + " \n", + " # ========================================================================\n", + " # LOAD DEFAULTS FROM TRADING_CONFIG\n", + " # ========================================================================\n", + " if symbol is None:\n", + " symbol = TRADING_CONFIG[\"symbols\"][\"primary\"]\n", + " if atr_mult is None:\n", + " atr_mult = TRADING_CONFIG[\"atr\"][\"base_multiplier\"]\n", + " if base_confidence is None:\n", + " base_confidence = TRADING_CONFIG[\"confidence\"][\"base_threshold\"]\n", + " if max_risk_per_trade is None:\n", + " max_risk_per_trade = TRADING_CONFIG[\"risk\"][\"max_risk_per_trade\"]\n", + " if max_positions is None:\n", + " max_positions = TRADING_CONFIG[\"risk\"][\"max_positions\"]\n", + " \n", + " \n", + " # SCHRITT 1: POSITION CHECK\n", + " print(f\"\\nπŸ” POSITION CHECK fΓΌr {symbol} (V1.6 Adaptive Complete)\")\n", + " has_position, position_info = check_existing_positions(symbol, strategy_name)\n", + " \n", + " if has_position and position_info['count'] >= max_positions:\n", + " if debug:\n", + " print(f\"πŸ›‘ TRADE BLOCKIERT: {position_info['count']}/{max_positions} Positionen aktiv\")\n", + " for pos in position_info['details']:\n", + " profit_emoji = \"🟒\" if pos['profit'] >= 0 else \"πŸ”΄\"\n", + " print(f\" {pos['type']} @ {pos['price_open']} | {profit_emoji} {pos['profit']:.2f}\")\n", + " return None\n", + " \n", + " print(f\"βœ… Position-Check OK: {position_info['count']}/{max_positions}\")\n", + " \n", + " # SCHRITT 2: Signal Analysis\n", + " signal_info = extended_top_down_v2_adaptive(symbol)\n", + " if signal_info is None:\n", + " print(\"❌ Signal-Analyse fehlgeschlagen\")\n", + " return None\n", + " \n", + " entry_signal = signal_info[\"entry_signal\"]\n", + " confidence = signal_info[\"confidence\"]\n", + " adaptive_threshold = signal_info[\"adaptive_threshold\"]\n", + " signal_quality = signal_info[\"signal_quality\"]\n", + " market_regime = signal_info[\"market_regime\"]\n", + " \n", + " # SCHRITT 3: Get Price/ATR\n", + " m5_info = signal_info[\"trend_info\"][\"M5\"]\n", + " price = m5_info[\"price\"]\n", + " atr = m5_info[\"atr\"]\n", + " \n", + " # SCHRITT 4: Pre-checks\n", + " reason = \"\"\n", + " \n", + " if confidence < adaptive_threshold:\n", + " reason = f\"Confidence {confidence}% < threshold {adaptive_threshold}%\"\n", + " elif entry_signal == 0:\n", + " reason = f\"No entry signal\"\n", + " elif price is None or atr is None:\n", + " reason = \"Price/ATR not available\"\n", + " elif risk_filter and atr < min_atr:\n", + " reason = f\"ATR {atr:.5f} < min_atr {min_atr}\"\n", + " else:\n", + " risk_ok = check_risk_limits(symbol, max_risk_per_trade=max_risk_per_trade)\n", + " if not risk_ok:\n", + " reason = \"Risk limits exceeded\"\n", + " \n", + " # SCHRITT 5: Execute Trade\n", + " if not reason:\n", + " # Final Position Check\n", + " final_check, _ = check_existing_positions(symbol, strategy_name)\n", + " if final_check:\n", + " print(f\"πŸ›‘ Position wurde zwischen Checks erΓΆffnet!\")\n", + " return None\n", + " \n", + " # SL/TP Calculation\n", + " regime_mult = 1.0\n", + " if market_regime['regime'] == 'volatile':\n", + " regime_mult = 1.2\n", + " elif market_regime['regime'] == 'ranging':\n", + " regime_mult = 0.9\n", + " \n", + " adjusted_atr_mult = atr_mult * regime_mult\n", + " \n", + " if entry_signal == 1: # Long\n", + " stop_loss = price - adjusted_atr_mult * atr\n", + " take_profit = price + adjusted_atr_mult * atr * 2.5\n", + " else: # Short\n", + " stop_loss = price + adjusted_atr_mult * atr\n", + " take_profit = price - adjusted_atr_mult * atr * 2.5\n", + " \n", + " # Position Sizing\n", + " account_info = mt.account_info()\n", + " if account_info:\n", + " balance = account_info.balance\n", + " risk_amount = balance * max_risk_per_trade\n", + " if symbol == \"XAUUSD\":\n", + " # 🎯 ADAPTIVE POSITION SIZING\n", + " if 'adv_position_mgr' in globals() and adv_position_mgr.adaptive_sizing:\n", + " volume = adv_position_mgr.adaptive_sizing.calculate_position_size(\n", + " confidence=confidence,\n", + " balance=balance,\n", + " stop_loss_distance=adjusted_atr_mult * atr * 10000, # Convert to pips\n", + " symbol=symbol\n", + " )\n", + " else:\n", + " volume = round(min(TRADING_CONFIG[\"lot_sizing\"][\"max_lot\"], max(TRADING_CONFIG[\"lot_sizing\"][\"min_lot\"], risk_amount / (adjusted_atr_mult * atr * 100))),2)\n", + " else:\n", + " volume = TRADING_CONFIG[\"lot_sizing\"][\"default_lot\"]\n", + " else:\n", + " volume = TRADING_CONFIG[\"lot_sizing\"][\"default_lot\"]\n", + " \n", + " # Log Trade Info\n", + " print(f\"\\nπŸš€ V1.6 ADAPTIVE COMPLETE TRADE EXECUTION\")\n", + " print(f\"Direction: {'LONG' if entry_signal == 1 else 'SHORT'}\")\n", + " print(f\"Price: {price:.5f} | Volume: {volume:.2f}\")\n", + " print(f\"SL: {stop_loss:.5f} | TP: {take_profit:.5f}\")\n", + " print(f\"Confidence: {confidence}% | Quality: {signal_quality.upper()}\")\n", + " print(f\"Regime: {market_regime['regime'].upper()}\")\n", + " print(f\"Adaptive Interval: {signal_info['adaptive_interval']} min\")\n", + " print(f\"Session: {signal_info['session'].upper()}\")\n", + " \n", + " # Execute\n", + " try:\n", + " order_result = market_order(\n", + " symbol=symbol,\n", + " volume=volume,\n", + " order_type=\"buy\" if entry_signal == 1 else \"sell\",\n", + " stoploss=stop_loss,\n", + " take_profit=take_profit\n", + " )\n", + " \n", + " if order_result and order_result.retcode == mt.TRADE_RETCODE_DONE:\n", + " print(f\"βœ… Trade erfolgreich! Ticket: {order_result.order}\")\n", + " \n", + " # ==========================================\n", + " # LOG TRADE ENTRY (V1.8)\n", + " # ==========================================\n", + " try:\n", + " # Hole Position Info\n", + " positions = mt.positions_get(symbol=symbol)\n", + " if positions and infra:\n", + " position = positions[0]\n", + "\n", + " # Erstelle Trade Data\n", + " trade_data = {\n", + " 'ticket': position.ticket,\n", + " 'position_id': position.identifier,\n", + " 'symbol': symbol,\n", + " 'strategy_name': strategy_name,\n", + " 'type': 'BUY' if entry_signal == 1 else 'SELL',\n", + " 'volume': volume,\n", + " 'entry_price': position.price_open,\n", + " 'sl_price': position.sl,\n", + " 'tp_price': position.tp,\n", + " 'entry_time': datetime.now().strftime('%Y-%m-%d %H:%M:%S'),\n", + " 'session': rhythm_manager.get_current_session(),\n", + " 'regime': market_regime['regime'],\n", + " 'quality': signal_quality,\n", + " 'confidence': confidence if 'confidence' in locals() else None,\n", + " 'timeframe_alignment': signal_info.get('required_alignment', 2),\n", + " 'risk_amount': risk_amount if 'risk_amount' in locals() else None,\n", + " 'risk_pct': max_risk_per_trade\n", + " }\n", + "\n", + " # Log to Database + Send Telegram\n", + " infra.log_trade_entry(trade_data)\n", + " logger.info(\"πŸ“± Trade logged to DB + Telegram notification sent\")\n", + "\n", + " except Exception as e:\n", + " logger.error(f\"⚠️ Infrastructure logging failed: {e}\")\n", + " # ==========================================\n", + "\n", + "\n", + " # Verify & Log\n", + " new_check, new_info = check_existing_positions(symbol, strategy_name)\n", + " print(f\"πŸ“Š Positionen: {new_info['count']}\")\n", + " log_trade_performance_adaptive(signal_info, order_result)\n", + " else:\n", + " print(f\"❌ Trade failed: {order_result.comment if order_result else 'No result'}\")\n", + " \n", + " return order_result\n", + " \n", + " except Exception as e:\n", + " print(f\"❌ Execution failed: {e}\")\n", + " return None\n", + " \n", + " else:\n", + " if debug:\n", + " print(f\"\\n⏸️ TRADE SKIPPED: {reason}\")\n", + " return None\n", + "\n", + "\n", "print(\"βœ… V1.6 Adaptive Complete Execute Trade defined\")" ] }, @@ -1586,7 +1600,7 @@ }, { "cell_type": "code", - "execution_count": 17, + "execution_count": 18, "metadata": {}, "outputs": [ { @@ -1644,7 +1658,7 @@ }, { "cell_type": "code", - "execution_count": 18, + "execution_count": 19, "metadata": {}, "outputs": [ { @@ -1720,7 +1734,7 @@ }, { "cell_type": "code", - "execution_count": 19, + "execution_count": 20, "metadata": {}, "outputs": [ { @@ -1809,7 +1823,7 @@ }, { "cell_type": "code", - "execution_count": 20, + "execution_count": 21, "metadata": {}, "outputs": [ { @@ -1866,7 +1880,7 @@ }, { "cell_type": "code", - "execution_count": 21, + "execution_count": 22, "metadata": {}, "outputs": [ { @@ -1957,7 +1971,7 @@ }, { "cell_type": "code", - "execution_count": 22, + "execution_count": 23, "metadata": {}, "outputs": [], "source": [ @@ -2036,7 +2050,7 @@ }, { "cell_type": "code", - "execution_count": 23, + "execution_count": 24, "metadata": {}, "outputs": [ { @@ -2087,7 +2101,7 @@ }, { "cell_type": "code", - "execution_count": 24, + "execution_count": 25, "metadata": {}, "outputs": [ { @@ -2100,11 +2114,11 @@ "\n", "πŸ“Š MULTI-TIMEFRAME REGIME CHECK\n", "============================================================\n", - " H1: ADX 19.4 (weight 1.0x) πŸ“Š RANGE\n", + " H1: ADX 19.2 (weight 1.0x) πŸ“Š RANGE\n", " H4: ADX 43.9 (weight 2.0x) βœ… TREND\n", " D1: ADX 29.6 (weight 3.0x) βœ… TREND\n", "\n", - " Weighted ADX: 32.7\n", + " Weighted ADX: 32.6\n", " Threshold: 25\n", "\n", " βœ… ALLOWED: TRENDING\n", @@ -2114,7 +2128,7 @@ "πŸ“‹ ERGEBNIS:\n", " Trading Allowed: True\n", " Regime: trending\n", - " Weighted ADX: 32.7\n", + " Weighted ADX: 32.6\n", "\n", "βœ… FILTER ERLAUBT TRADES!\n", " β†’ Bot wird bei nΓ€chstem Scheduler-Run traden (wenn andere Bedingungen passen)\n" @@ -2153,7 +2167,7 @@ }, { "cell_type": "code", - "execution_count": 25, + "execution_count": 26, "metadata": {}, "outputs": [ { @@ -2234,7 +2248,7 @@ }, { "cell_type": "code", - "execution_count": 26, + "execution_count": 27, "metadata": {}, "outputs": [ { @@ -2365,7 +2379,7 @@ }, { "cell_type": "code", - "execution_count": 27, + "execution_count": 28, "metadata": {}, "outputs": [ { @@ -2415,7 +2429,7 @@ }, { "cell_type": "code", - "execution_count": 28, + "execution_count": 29, "metadata": {}, "outputs": [ { @@ -2492,14 +2506,14 @@ }, { "cell_type": "code", - "execution_count": 29, + "execution_count": 30, "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ - "2026-01-14 12:17:45,679 - INFO - βœ… Trading resumed after: None\n" + "2026-01-14 13:36:41,182 - INFO - βœ… Trading resumed after: None\n" ] }, { @@ -2518,7 +2532,7 @@ }, { "cell_type": "code", - "execution_count": 30, + "execution_count": 31, "metadata": {}, "outputs": [], "source": [ @@ -2564,7 +2578,7 @@ }, { "cell_type": "code", - "execution_count": 31, + "execution_count": 32, "metadata": {}, "outputs": [ { @@ -2592,40 +2606,40 @@ } ], "source": [ - "# ============================================================================", - "# NOTE: This config is DEPRECATED - use TRADING_CONFIG in Cell 6 instead", - "# This is kept for backward compatibility only", - "# ============================================================================", - "", - "# βœ… KORRIGIERT: Zentrale Konfiguration (fehlte in ursprΓΌnglicher V1.6)", - "ADAPTIVE_COMPLETE_CONFIG = {", - " 'symbol': symbol,", - " 'atr_mult': 1.5,", - " 'base_confidence': 60, # RELAXED", - " 'max_risk_per_trade': 0.02,", - " 'risk_filter': True,", - " 'min_atr': 0.0008, # RELAXED", - " 'use_pullback_entry': False, # DISABLED", - " 'max_positions': max_positions,", - " 'strategy_name': strategy_name,", - " 'debug': True", - "}", - "", - "print(\"βš™οΈ V1.6 Adaptive Complete Configuration:\")", - "print(\"\\nπŸ›‘οΈ Position Control:\")", - "print(f\" Max Positions: {ADAPTIVE_COMPLETE_CONFIG['max_positions']}\")", - "print(f\" Strategy: {ADAPTIVE_COMPLETE_CONFIG['strategy_name']}\")", - "", - "print(\"\\nπŸš€ Relaxed Parameters:\")", - "print(f\" Base Confidence: {ADAPTIVE_COMPLETE_CONFIG['base_confidence']}%\")", - "print(f\" Min ATR: {ADAPTIVE_COMPLETE_CONFIG['min_atr']}\")", - "print(f\" Pullback Entry: {ADAPTIVE_COMPLETE_CONFIG['use_pullback_entry']}\")", - "", - "print(\"\\n⚑ Adaptive Features:\")", - "print(f\" Dynamic Intervals: 5/15/30 min\")", - "print(f\" Session-aware: Yes\")", - "print(f\" Volatility-based: Yes\")", - "", + "# ============================================================================\n", + "# NOTE: This config is DEPRECATED - use TRADING_CONFIG in Cell 6 instead\n", + "# This is kept for backward compatibility only\n", + "# ============================================================================\n", + "\n", + "# βœ… KORRIGIERT: Zentrale Konfiguration (fehlte in ursprΓΌnglicher V1.6)\n", + "ADAPTIVE_COMPLETE_CONFIG = {\n", + " 'symbol': symbol,\n", + " 'atr_mult': 1.5,\n", + " 'base_confidence': 60, # RELAXED\n", + " 'max_risk_per_trade': 0.02,\n", + " 'risk_filter': True,\n", + " 'min_atr': 0.0008, # RELAXED\n", + " 'use_pullback_entry': False, # DISABLED\n", + " 'max_positions': max_positions,\n", + " 'strategy_name': strategy_name,\n", + " 'debug': True\n", + "}\n", + "\n", + "print(\"βš™οΈ V1.6 Adaptive Complete Configuration:\")\n", + "print(\"\\nπŸ›‘οΈ Position Control:\")\n", + "print(f\" Max Positions: {ADAPTIVE_COMPLETE_CONFIG['max_positions']}\")\n", + "print(f\" Strategy: {ADAPTIVE_COMPLETE_CONFIG['strategy_name']}\")\n", + "\n", + "print(\"\\nπŸš€ Relaxed Parameters:\")\n", + "print(f\" Base Confidence: {ADAPTIVE_COMPLETE_CONFIG['base_confidence']}%\")\n", + "print(f\" Min ATR: {ADAPTIVE_COMPLETE_CONFIG['min_atr']}\")\n", + "print(f\" Pullback Entry: {ADAPTIVE_COMPLETE_CONFIG['use_pullback_entry']}\")\n", + "\n", + "print(\"\\n⚑ Adaptive Features:\")\n", + "print(f\" Dynamic Intervals: 5/15/30 min\")\n", + "print(f\" Session-aware: Yes\")\n", + "print(f\" Volatility-based: Yes\")\n", + "\n", "print(\"\\nβœ… Configuration complete!\")" ] }, @@ -2638,7 +2652,7 @@ }, { "cell_type": "code", - "execution_count": 32, + "execution_count": 33, "metadata": {}, "outputs": [ { @@ -2732,26 +2746,26 @@ }, { "cell_type": "code", - "execution_count": 33, + "execution_count": 34, "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ - "2026-01-14 12:17:47,190 - INFO - Adding job tentatively -- it will be properly scheduled when the scheduler starts\n", - "2026-01-14 12:17:47,193 - INFO - Adding job tentatively -- it will be properly scheduled when the scheduler starts\n", - "2026-01-14 12:17:47,195 - INFO - Adding job tentatively -- it will be properly scheduled when the scheduler starts\n", - "2026-01-14 12:17:47,196 - INFO - Adding job tentatively -- it will be properly scheduled when the scheduler starts\n", - "2026-01-14 12:17:47,237 - INFO - Adding job tentatively -- it will be properly scheduled when the scheduler starts\n", - "2026-01-14 12:17:47,242 - INFO - Adding job tentatively -- it will be properly scheduled when the scheduler starts\n", - "2026-01-14 12:17:47,247 - INFO - Added job \"create_protected_trading_check..protected_check\" to job store \"default\"\n", - "2026-01-14 12:17:47,249 - INFO - Added job \"print_status_report\" to job store \"default\"\n", - "2026-01-14 12:17:47,252 - INFO - Added job \"TradingInfrastructure.send_daily_report\" to job store \"default\"\n", - "2026-01-14 12:17:47,254 - INFO - Added job \"TradingInfrastructure.send_weekly_report\" to job store \"default\"\n", - "2026-01-14 12:17:47,255 - INFO - Added job \"PositionMonitor.check_open_positions\" to job store \"default\"\n", - "2026-01-14 12:17:47,257 - INFO - Added job \"\" to job store \"default\"\n", - "2026-01-14 12:17:47,258 - INFO - Scheduler started\n" + "2026-01-14 13:36:41,808 - INFO - Adding job tentatively -- it will be properly scheduled when the scheduler starts\n", + "2026-01-14 13:36:41,810 - INFO - Adding job tentatively -- it will be properly scheduled when the scheduler starts\n", + "2026-01-14 13:36:41,811 - INFO - Adding job tentatively -- it will be properly scheduled when the scheduler starts\n", + "2026-01-14 13:36:41,813 - INFO - Adding job tentatively -- it will be properly scheduled when the scheduler starts\n", + "2026-01-14 13:36:41,830 - INFO - Adding job tentatively -- it will be properly scheduled when the scheduler starts\n", + "2026-01-14 13:36:41,832 - INFO - Adding job tentatively -- it will be properly scheduled when the scheduler starts\n", + "2026-01-14 13:36:41,834 - INFO - Added job \"create_protected_trading_check..protected_check\" to job store \"default\"\n", + "2026-01-14 13:36:41,836 - INFO - Added job \"print_status_report\" to job store \"default\"\n", + "2026-01-14 13:36:41,837 - INFO - Added job \"TradingInfrastructure.send_daily_report\" to job store \"default\"\n", + "2026-01-14 13:36:41,840 - INFO - Added job \"TradingInfrastructure.send_weekly_report\" to job store \"default\"\n", + "2026-01-14 13:36:41,841 - INFO - Added job \"PositionMonitor.check_open_positions\" to job store \"default\"\n", + "2026-01-14 13:36:41,843 - INFO - Added job \"\" to job store \"default\"\n", + "2026-01-14 13:36:41,844 - INFO - Scheduler started\n" ] }, { @@ -2862,7 +2876,7 @@ }, { "cell_type": "code", - "execution_count": 34, + "execution_count": 35, "metadata": {}, "outputs": [ { @@ -2874,26 +2888,16 @@ "\n", "πŸ“Š POSITION SUMMARY fΓΌr XAUUSD (V1.6 Adaptive Complete)\n", "============================================================\n", - "⚠️ 1 aktive Position(en) gefunden:\n", - "\n", - " Position 1:\n", - " Ticket: 668660737\n", - " Typ: BUY\n", - " Volumen: 0.01\n", - " ErΓΆffnungspreis: 4636.11\n", - " Profit: 🟒 0.58\n", - " ErΓΆffnungszeit: 2026-01-14 13:05:44\n", - "\n", - "πŸ›‘ TRADING BLOCKIERT - Maximal 1 Position erlaubt\n" + "βœ… Keine aktiven Positionen - bereit fΓΌr neuen Trade\n" ] }, { "data": { "text/plain": [ - "True" + "False" ] }, - "execution_count": 34, + "execution_count": 35, "metadata": {}, "output_type": "execute_result" } @@ -2909,9 +2913,17 @@ }, { "cell_type": "code", - "execution_count": 35, + "execution_count": 36, "metadata": {}, "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2026-01-14 13:36:42,232 - INFO - πŸ”„ Rhythmus-Γ„nderung: 5m β†’ 15m\n", + "2026-01-14 13:36:42,232 - INFO - Session: london, VolatilitΓ€t: medium (ATR: 14.71)\n" + ] + }, { "name": "stdout", "output_type": "stream", @@ -2921,38 +2933,24 @@ "==================================================\n", "\n", "╔════════════════════════════════════════════════════════╗\n", - "β•‘ ADAPTIVE RHYTHM STATUS - 12:17:48 UTC β•‘\n", + "β•‘ ADAPTIVE RHYTHM STATUS - 13:36:42 UTC β•‘\n", "╠════════════════════════════════════════════════════════╣\n", "β•‘ Aktuelles Intervall: 5 Minuten β•‘\n", "β•‘ Trading Session: LONDON β•‘\n", "β•‘ VolatilitΓ€tslevel: MEDIUM β•‘\n", - "β•‘ ATR (H1): 14.83 β•‘\n", + "β•‘ ATR (H1): 14.71 β•‘\n", "╠════════════════════════════════════════════════════════╣\n", "β•‘ INTERVALL-SCHEMA: β•‘\n", "β•‘ β€’ Overlap (13-16 UTC): 5-15 Min (aktivste Phase) β•‘\n", "β•‘ β€’ London/NY: 5-30 Min (volatilitΓ€tsabh.) β•‘\n", "β•‘ β€’ Asian Session: 15-30 Min (ruhigere Phase) β•‘\n", "β•šβ•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•\n", - "\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2026-01-14 12:17:48,502 - INFO - πŸ”„ Rhythmus-Γ„nderung: 5m β†’ 15m\n", - "2026-01-14 12:17:48,504 - INFO - Session: london, VolatilitΓ€t: medium (ATR: 14.83)\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ + "\n", "\n", "Details:\n", " Optimal Interval: 15 min\n", " Session: london\n", - " ATR: 14.83\n", + " ATR: 14.71\n", " Volatility Level: medium\n" ] } @@ -2980,7 +2978,7 @@ }, { "cell_type": "code", - "execution_count": 36, + "execution_count": 37, "metadata": {}, "outputs": [ { @@ -3000,19 +2998,19 @@ "+------+---------+------------+---------+----------+---------+\n", "| TF | Trend | Strength | ATR | Slope | Price |\n", "|------+---------+------------+---------+----------+---------|\n", - "| D1 | uptrend | 739.83 | 82.3776 | 9.14182 | 4636.69 |\n", - "| H4 | uptrend | 464.11 | 31.7911 | 2.21321 | 4636.69 |\n", - "| H1 | uptrend | 620.84 | 14.8519 | 1.38309 | 4636.69 |\n", - "| M30 | uptrend | 646.01 | 10.1552 | 0.984047 | 4636.69 |\n", - "| M15 | uptrend | 342.8 | 6.3281 | 0.325397 | 4636.69 |\n", - "| M5 | uptrend | 535.23 | 3.1955 | 0.256551 | 4636.69 |\n", + "| D1 | uptrend | 739.8 | 82.3776 | 9.14147 | 4635.21 |\n", + "| H4 | uptrend | 461.44 | 31.9704 | 2.21286 | 4635.21 |\n", + "| H1 | uptrend | 631.35 | 14.6929 | 1.39145 | 4635.21 |\n", + "| M30 | uptrend | 667.89 | 9.4286 | 0.944595 | 4635.21 |\n", + "| M15 | uptrend | 369.67 | 6.347 | 0.351944 | 4635.21 |\n", + "| M5 | uptrend | 304.77 | 3.528 | 0.161284 | 4635.21 |\n", "+------+---------+------------+---------+----------+---------+\n", "\n", - "➑️ Standard-Trend: uptrend (Strength: 629.54)\n", + "➑️ Standard-Trend: uptrend (Strength: 628.46)\n", "➑️ Fast-Trend: uptrend (Required: 2/4)\n", "➑️ Top-Down-Trend: uptrend\n", "➑️ Confidence: 100.0% (Threshold: 70%)\n", - "➑️ Risk-Adjusted Strength: 218695.9 (Min: 80)\n", + "➑️ Risk-Adjusted Strength: 213782.6 (Min: 80)\n", "➑️ Signal Quality: EXCELLENT\n", "\n", "πŸš€ V1.6 Adaptive Complete: Full Features + Adaptive Rhythm\n", @@ -3058,7 +3056,7 @@ }, { "cell_type": "code", - "execution_count": 37, + "execution_count": 38, "metadata": {}, "outputs": [ { @@ -3081,13 +3079,12 @@ "⚑ ADAPTIVE RHYTHM:\n", " Current Interval: 15 min\n", " Trading Session: LONDON\n", - " ATR (H1): 14.83\n", + " ATR (H1): 14.71\n", " Volatility: MEDIUM\n", "\n", "πŸ›‘οΈ POSITION CONTROL:\n", - " Active Positions: 1/1\n", - " Trading Status: πŸ›‘ BLOCKED\n", - " Position 1: BUY | 🟒 0.58\n", + " Active Positions: 0/1\n", + " Trading Status: βœ… READY\n", "\n", "πŸ“Š CURRENT SIGNAL:\n", "πŸ” Analyzing XAUUSD with V1.6 ADAPTIVE COMPLETE parameters...\n", @@ -3100,19 +3097,19 @@ "+------+---------+------------+---------+----------+---------+\n", "| TF | Trend | Strength | ATR | Slope | Price |\n", "|------+---------+------------+---------+----------+---------|\n", - "| D1 | uptrend | 739.83 | 82.3776 | 9.14182 | 4636.69 |\n", - "| H4 | uptrend | 464.11 | 31.7911 | 2.21321 | 4636.69 |\n", - "| H1 | uptrend | 620.84 | 14.8519 | 1.38309 | 4636.69 |\n", - "| M30 | uptrend | 646.01 | 10.1552 | 0.984047 | 4636.69 |\n", - "| M15 | uptrend | 342.8 | 6.3281 | 0.325397 | 4636.69 |\n", - "| M5 | uptrend | 535.23 | 3.1955 | 0.256551 | 4636.69 |\n", + "| D1 | uptrend | 739.8 | 82.3776 | 9.14147 | 4635.2 |\n", + "| H4 | uptrend | 461.44 | 31.9704 | 2.21285 | 4635.2 |\n", + "| H1 | uptrend | 631.35 | 14.6929 | 1.39145 | 4635.2 |\n", + "| M30 | uptrend | 667.89 | 9.4286 | 0.944593 | 4635.2 |\n", + "| M15 | uptrend | 369.66 | 6.347 | 0.351941 | 4635.2 |\n", + "| M5 | uptrend | 304.76 | 3.528 | 0.161282 | 4635.2 |\n", "+------+---------+------------+---------+----------+---------+\n", "\n", - "➑️ Standard-Trend: uptrend (Strength: 629.54)\n", + "➑️ Standard-Trend: uptrend (Strength: 628.46)\n", "➑️ Fast-Trend: uptrend (Required: 2/4)\n", "➑️ Top-Down-Trend: uptrend\n", "➑️ Confidence: 100.0% (Threshold: 70%)\n", - "➑️ Risk-Adjusted Strength: 218695.9 (Min: 80)\n", + "➑️ Risk-Adjusted Strength: 213782.0 (Min: 80)\n", "➑️ Signal Quality: EXCELLENT\n", "\n", "πŸš€ V1.6 Adaptive Complete: Full Features + Adaptive Rhythm\n", @@ -3121,7 +3118,7 @@ " Threshold: 70%\n", " Quality: EXCELLENT\n", " Regime: RANGING\n", - " Would Trade: ❌ NO\n", + " Would Trade: βœ… YES\n", "\n", "πŸŽ‰ VERSION INFO:\n", " Version: V1.6 Adaptive Complete (CORRECTED)\n", @@ -3140,7 +3137,7 @@ }, { "cell_type": "code", - "execution_count": 38, + "execution_count": 39, "metadata": {}, "outputs": [ { @@ -3155,11 +3152,11 @@ "\n", "πŸ“Š MULTI-TIMEFRAME REGIME CHECK\n", "============================================================\n", - " H1: ADX 19.4 (weight 1.0x) πŸ“Š RANGE\n", + " H1: ADX 19.2 (weight 1.0x) πŸ“Š RANGE\n", " H4: ADX 43.9 (weight 2.0x) βœ… TREND\n", " D1: ADX 29.6 (weight 3.0x) βœ… TREND\n", "\n", - " Weighted ADX: 32.7\n", + " Weighted ADX: 32.6\n", " Threshold: 25\n", "\n", " βœ… ALLOWED: TRENDING\n", @@ -3170,10 +3167,88 @@ " Reason: H4 + D1 beide trending (H4: 43.9, D1: 29.6)\n", "\n", "πŸ” POSITION CHECK fΓΌr XAUUSD (V1.6 Adaptive Complete)\n", - "πŸ›‘ TRADE BLOCKIERT: 1/1 Positionen aktiv\n", - " BUY @ 4636.11 | 🟒 0.58\n", + "βœ… Position-Check OK: 0/1\n", + "πŸ” Analyzing XAUUSD with V1.6 ADAPTIVE COMPLETE parameters...\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2026-01-14 13:36:43,783 - INFO - πŸ“Š Adaptive Position Sizing:\n", + "2026-01-14 13:36:43,785 - INFO - Confidence: 100.0% (HIGH)\n", + "2026-01-14 13:36:43,786 - INFO - Base Risk: 2.0%\n", + "2026-01-14 13:36:43,787 - INFO - Multiplier: 1.5x\n", + "2026-01-14 13:36:43,788 - INFO - Adjusted Risk: 3.0%\n", + "2026-01-14 13:36:43,789 - INFO - πŸ’° Position Size: 0.01 lots\n", + "2026-01-14 13:36:43,790 - INFO - Risk Amount: $207.29\n", + "2026-01-14 13:36:43,791 - INFO - SL Distance: 47628.65 pips\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ "\n", - "⏸️ Kein Trade - Bedingungen nicht erfΓΌllt\n" + "πŸ“Š V1.6 ADAPTIVE COMPLETE Trend-Analyse fΓΌr XAUUSD\n", + "⚑ Adaptive Interval: 15 min | Session: LONDON\n", + "🎯 Market Regime: RANGING (Strength: 1%)\n", + "🎚️ Adaptive Threshold: 70% (RELAXED)\n", + "\n", + "+------+---------+------------+---------+----------+---------+\n", + "| TF | Trend | Strength | ATR | Slope | Price |\n", + "|------+---------+------------+---------+----------+---------|\n", + "| D1 | uptrend | 739.8 | 82.3776 | 9.14147 | 4635.2 |\n", + "| H4 | uptrend | 461.44 | 31.9704 | 2.21285 | 4635.2 |\n", + "| H1 | uptrend | 631.35 | 14.6929 | 1.39145 | 4635.2 |\n", + "| M30 | uptrend | 667.89 | 9.4286 | 0.944593 | 4635.2 |\n", + "| M15 | uptrend | 369.66 | 6.347 | 0.351941 | 4635.2 |\n", + "| M5 | uptrend | 304.76 | 3.528 | 0.161282 | 4635.2 |\n", + "+------+---------+------------+---------+----------+---------+\n", + "\n", + "➑️ Standard-Trend: uptrend (Strength: 628.46)\n", + "➑️ Fast-Trend: uptrend (Required: 2/4)\n", + "➑️ Top-Down-Trend: uptrend\n", + "➑️ Confidence: 100.0% (Threshold: 70%)\n", + "➑️ Risk-Adjusted Strength: 213782.0 (Min: 80)\n", + "➑️ Signal Quality: EXCELLENT\n", + "\n", + "πŸš€ V1.6 Adaptive Complete: Full Features + Adaptive Rhythm\n", + "\n", + "πŸš€ V1.6 ADAPTIVE COMPLETE TRADE EXECUTION\n", + "Direction: LONG\n", + "Price: 4635.20000 | Volume: 0.01\n", + "SL: 4630.43714 | TP: 4647.10716\n", + "Confidence: 100.0% | Quality: EXCELLENT\n", + "Regime: RANGING\n", + "Adaptive Interval: 15 min\n", + "Session: LONDON\n", + "βœ… Trade erfolgreich! Ticket: 668899888\n", + "βœ… Command handlers registered\n", + "πŸš€ Starting Telegram Bot...\n", + "πŸ“± Send /help to see available commands\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2026-01-14 13:36:45,082 - INFO - HTTP Request: POST https://api.telegram.org/bot7783303065:AAHVVvwWGqmhJ2BVq8LqkLRSsicKy1CUsD8/sendMessage \"HTTP/1.1 200 OK\"\n", + "2026-01-14 13:36:45,104 - INFO - HTTP Request: POST https://api.telegram.org/bot7783303065:AAHVVvwWGqmhJ2BVq8LqkLRSsicKy1CUsD8/getMe \"HTTP/1.1 200 OK\"\n", + "2026-01-14 13:36:45,107 - INFO - Application started\n", + "2026-01-14 13:36:45,130 - INFO - HTTP Request: POST https://api.telegram.org/bot7783303065:AAHVVvwWGqmhJ2BVq8LqkLRSsicKy1CUsD8/deleteWebhook \"HTTP/1.1 200 OK\"\n", + "2026-01-14 13:36:45,329 - INFO - πŸ“± Trade logged to DB + Telegram notification sent\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "βœ… Bot is running\n", + "πŸ“Š Positionen: 1\n", + "πŸ“Š Performance logged to trade_performance_v16_XAUUSD_202601.json\n", + "\n", + "βœ… Trade wΓΌrde ausgefΓΌhrt!\n" ] } ], @@ -3204,7 +3279,7 @@ }, { "cell_type": "code", - "execution_count": 39, + "execution_count": 40, "metadata": {}, "outputs": [ { @@ -3218,7 +3293,7 @@ " ]" ] }, - "execution_count": 39, + "execution_count": 40, "metadata": {}, "output_type": "execute_result" } @@ -3229,7 +3304,7 @@ }, { "cell_type": "code", - "execution_count": 40, + "execution_count": 41, "metadata": {}, "outputs": [ { @@ -3239,11 +3314,11 @@ "\n", "πŸ“Š MULTI-TIMEFRAME REGIME CHECK\n", "============================================================\n", - " H1: ADX 19.4 (weight 1.0x) πŸ“Š RANGE\n", + " H1: ADX 19.2 (weight 1.0x) πŸ“Š RANGE\n", " H4: ADX 43.9 (weight 2.0x) βœ… TREND\n", " D1: ADX 29.6 (weight 3.0x) βœ… TREND\n", "\n", - " Weighted ADX: 32.7\n", + " Weighted ADX: 32.6\n", " Threshold: 25\n", "\n", " βœ… ALLOWED: TRENDING\n", @@ -3255,7 +3330,7 @@ "\n", "πŸ” POSITION CHECK fΓΌr XAUUSD (V1.6 Adaptive Complete)\n", "πŸ›‘ TRADE BLOCKIERT: 1/1 Positionen aktiv\n", - " BUY @ 4636.11 | 🟒 0.58\n" + " BUY @ 4635.22 | πŸ”΄ -0.42\n" ] } ], @@ -3265,7 +3340,7 @@ }, { "cell_type": "code", - "execution_count": 41, + "execution_count": 42, "metadata": {}, "outputs": [ { @@ -3360,7 +3435,7 @@ }, { "cell_type": "code", - "execution_count": 42, + "execution_count": 43, "metadata": {}, "outputs": [ { @@ -3381,7 +3456,7 @@ }, { "cell_type": "code", - "execution_count": 43, + "execution_count": 44, "metadata": {}, "outputs": [ { @@ -3407,7 +3482,7 @@ }, { "cell_type": "code", - "execution_count": 44, + "execution_count": 45, "metadata": {}, "outputs": [ { @@ -3451,7 +3526,7 @@ }, { "cell_type": "code", - "execution_count": 45, + "execution_count": 46, "metadata": {}, "outputs": [ { @@ -3624,7 +3699,7 @@ }, { "cell_type": "code", - "execution_count": 46, + "execution_count": 47, "metadata": {}, "outputs": [ { @@ -3676,7 +3751,7 @@ }, { "cell_type": "code", - "execution_count": 47, + "execution_count": 48, "metadata": {}, "outputs": [], "source": [ @@ -3760,7 +3835,7 @@ }, { "cell_type": "code", - "execution_count": 48, + "execution_count": 49, "metadata": {}, "outputs": [ { @@ -3797,129 +3872,222 @@ "text": [ "πŸ“Š ADX auf verschiedenen Timeframes:\n", "\n", - "M15 : ADX = 10.42 | Preis-Change (10 bars): -0.04%\n", - "H1 : ADX = 19.39 | Preis-Change (10 bars): +0.35%\n", - "H4 : ADX = 43.90 | Preis-Change (10 bars): +1.28%\n", - "D1 : ADX = 29.61 | Preis-Change (10 bars): +7.36%\n", + "M15 : ADX = 10.34 | Preis-Change (10 bars): -0.00%\n", + "H1 : ADX = 19.21 | Preis-Change (10 bars): +0.14%\n", + "H4 : ADX = 43.90 | Preis-Change (10 bars): +1.24%\n", + "D1 : ADX = 29.61 | Preis-Change (10 bars): +7.32%\n", "\n", - "πŸ’° Aktueller Preis: 4636.59\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "βœ… Command handlers registered\n", - "πŸš€ Starting Telegram Bot...\n", - "πŸ“± Send /help to see available commands\n" + "πŸ’° Aktueller Preis: 4634.80\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ - "2026-01-14 12:17:52,576 - INFO - HTTP Request: POST https://api.telegram.org/bot7783303065:AAHVVvwWGqmhJ2BVq8LqkLRSsicKy1CUsD8/sendMessage \"HTTP/1.1 200 OK\"\n", - "2026-01-14 12:17:52,598 - INFO - HTTP Request: POST https://api.telegram.org/bot7783303065:AAHVVvwWGqmhJ2BVq8LqkLRSsicKy1CUsD8/getMe \"HTTP/1.1 200 OK\"\n", - "2026-01-14 12:17:52,600 - INFO - Application started\n", - "2026-01-14 12:17:52,627 - INFO - HTTP Request: POST https://api.telegram.org/bot7783303065:AAHVVvwWGqmhJ2BVq8LqkLRSsicKy1CUsD8/deleteWebhook \"HTTP/1.1 200 OK\"\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "βœ… Bot is running\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2026-01-14 12:18:00,002 - INFO - Running job \"create_protected_trading_check..protected_check (trigger: cron[minute='*'], next run at: 2026-01-14 12:18:00 CET)\" (scheduled at 2026-01-14 12:18:00+01:00)\n", - "2026-01-14 12:18:00,009 - INFO - ⏸️ Trading SKIP: London blocked: 12.5% win-rate, -$10/trade\n", - "2026-01-14 12:18:00,016 - INFO - Job \"create_protected_trading_check..protected_check (trigger: cron[minute='*'], next run at: 2026-01-14 12:19:00 CET)\" executed successfully\n", - "2026-01-14 12:18:02,693 - INFO - HTTP Request: POST https://api.telegram.org/bot7783303065:AAHVVvwWGqmhJ2BVq8LqkLRSsicKy1CUsD8/getUpdates \"HTTP/1.1 200 OK\"\n", - "2026-01-14 12:18:12,728 - INFO - HTTP Request: POST https://api.telegram.org/bot7783303065:AAHVVvwWGqmhJ2BVq8LqkLRSsicKy1CUsD8/getUpdates \"HTTP/1.1 200 OK\"\n", - "2026-01-14 12:18:22,756 - INFO - HTTP Request: POST https://api.telegram.org/bot7783303065:AAHVVvwWGqmhJ2BVq8LqkLRSsicKy1CUsD8/getUpdates \"HTTP/1.1 200 OK\"\n", - "2026-01-14 12:18:32,779 - INFO - HTTP Request: POST https://api.telegram.org/bot7783303065:AAHVVvwWGqmhJ2BVq8LqkLRSsicKy1CUsD8/getUpdates \"HTTP/1.1 200 OK\"\n", - "2026-01-14 12:18:42,802 - INFO - HTTP Request: POST https://api.telegram.org/bot7783303065:AAHVVvwWGqmhJ2BVq8LqkLRSsicKy1CUsD8/getUpdates \"HTTP/1.1 200 OK\"\n", - "2026-01-14 12:18:47,240 - INFO - Running job \"PositionMonitor.check_open_positions (trigger: interval[0:01:00], next run at: 2026-01-14 12:19:47 CET)\" (scheduled at 2026-01-14 12:18:47.237307+01:00)\n", - "2026-01-14 12:18:47,297 - INFO - Job \"PositionMonitor.check_open_positions (trigger: interval[0:01:00], next run at: 2026-01-14 12:19:47 CET)\" executed successfully\n", - "2026-01-14 12:18:47,440 - INFO - Running job \" (trigger: interval[0:01:00], next run at: 2026-01-14 12:19:47 CET)\" (scheduled at 2026-01-14 12:18:47.242309+01:00)\n", - "2026-01-14 12:18:47,455 - INFO - \n", + "2026-01-14 13:36:55,197 - INFO - HTTP Request: POST https://api.telegram.org/bot7783303065:AAHVVvwWGqmhJ2BVq8LqkLRSsicKy1CUsD8/getUpdates \"HTTP/1.1 200 OK\"\n", + "2026-01-14 13:37:00,003 - INFO - Running job \"create_protected_trading_check..protected_check (trigger: cron[minute='*'], next run at: 2026-01-14 13:38:00 CET)\" (scheduled at 2026-01-14 13:37:00+01:00)\n", + "2026-01-14 13:37:00,190 - INFO - ⏸️ Trading SKIP: London blocked: 12.5% win-rate, -$10/trade\n", + "2026-01-14 13:37:00,207 - INFO - Job \"create_protected_trading_check..protected_check (trigger: cron[minute='*'], next run at: 2026-01-14 13:38:00 CET)\" executed successfully\n", + "2026-01-14 13:37:05,218 - INFO - HTTP Request: POST https://api.telegram.org/bot7783303065:AAHVVvwWGqmhJ2BVq8LqkLRSsicKy1CUsD8/getUpdates \"HTTP/1.1 200 OK\"\n", + "2026-01-14 13:37:15,251 - INFO - HTTP Request: POST https://api.telegram.org/bot7783303065:AAHVVvwWGqmhJ2BVq8LqkLRSsicKy1CUsD8/getUpdates \"HTTP/1.1 200 OK\"\n", + "2026-01-14 13:37:25,281 - INFO - HTTP Request: POST https://api.telegram.org/bot7783303065:AAHVVvwWGqmhJ2BVq8LqkLRSsicKy1CUsD8/getUpdates \"HTTP/1.1 200 OK\"\n", + "2026-01-14 13:37:35,311 - INFO - HTTP Request: POST https://api.telegram.org/bot7783303065:AAHVVvwWGqmhJ2BVq8LqkLRSsicKy1CUsD8/getUpdates \"HTTP/1.1 200 OK\"\n", + "2026-01-14 13:37:41,838 - INFO - Running job \"PositionMonitor.check_open_positions (trigger: interval[0:01:00], next run at: 2026-01-14 13:38:41 CET)\" (scheduled at 2026-01-14 13:37:41.830706+01:00)\n", + "2026-01-14 13:37:41,838 - INFO - Running job \" (trigger: interval[0:01:00], next run at: 2026-01-14 13:38:41 CET)\" (scheduled at 2026-01-14 13:37:41.832703+01:00)\n", + "2026-01-14 13:37:41,852 - INFO - \n", "πŸ” Checking 1 position(s) for XAUUSD...\n", - "2026-01-14 12:18:47,457 - INFO - πŸ“Š Partial TP Levels:\n", - "2026-01-14 12:18:47,461 - INFO - Entry: 4636.11000\n", - "2026-01-14 12:18:47,473 - INFO - SL: 4631.52000\n", - "2026-01-14 12:18:47,475 - INFO - Risk: 4.59000\n", - "2026-01-14 12:18:47,506 - INFO - TP1 (1.5R): 4642.99500\n", - "2026-01-14 12:18:47,509 - INFO - TP2 (2.5R): 4647.58500\n", - "2026-01-14 12:18:47,556 - INFO - Job \" (trigger: interval[0:01:00], next run at: 2026-01-14 12:19:47 CET)\" executed successfully\n", - "2026-01-14 12:18:52,825 - INFO - HTTP Request: POST https://api.telegram.org/bot7783303065:AAHVVvwWGqmhJ2BVq8LqkLRSsicKy1CUsD8/getUpdates \"HTTP/1.1 200 OK\"\n", - "2026-01-14 12:19:00,121 - INFO - Running job \"create_protected_trading_check..protected_check (trigger: cron[minute='*'], next run at: 2026-01-14 12:20:00 CET)\" (scheduled at 2026-01-14 12:19:00+01:00)\n", - "2026-01-14 12:19:00,127 - INFO - ⏸️ Trading SKIP: London blocked: 12.5% win-rate, -$10/trade\n", - "2026-01-14 12:19:00,173 - INFO - Job \"create_protected_trading_check..protected_check (trigger: cron[minute='*'], next run at: 2026-01-14 12:20:00 CET)\" executed successfully\n", - "2026-01-14 12:19:02,850 - INFO - HTTP Request: POST https://api.telegram.org/bot7783303065:AAHVVvwWGqmhJ2BVq8LqkLRSsicKy1CUsD8/getUpdates \"HTTP/1.1 200 OK\"\n", - "2026-01-14 12:19:12,870 - INFO - HTTP Request: POST https://api.telegram.org/bot7783303065:AAHVVvwWGqmhJ2BVq8LqkLRSsicKy1CUsD8/getUpdates \"HTTP/1.1 200 OK\"\n", - "2026-01-14 12:19:22,895 - INFO - HTTP Request: POST https://api.telegram.org/bot7783303065:AAHVVvwWGqmhJ2BVq8LqkLRSsicKy1CUsD8/getUpdates \"HTTP/1.1 200 OK\"\n", - "2026-01-14 12:19:32,920 - INFO - HTTP Request: POST https://api.telegram.org/bot7783303065:AAHVVvwWGqmhJ2BVq8LqkLRSsicKy1CUsD8/getUpdates \"HTTP/1.1 200 OK\"\n", - "2026-01-14 12:19:42,943 - INFO - HTTP Request: POST https://api.telegram.org/bot7783303065:AAHVVvwWGqmhJ2BVq8LqkLRSsicKy1CUsD8/getUpdates \"HTTP/1.1 200 OK\"\n", - "2026-01-14 12:19:47,239 - INFO - Running job \"PositionMonitor.check_open_positions (trigger: interval[0:01:00], next run at: 2026-01-14 12:20:47 CET)\" (scheduled at 2026-01-14 12:19:47.237307+01:00)\n", - "2026-01-14 12:19:47,250 - INFO - Job \"PositionMonitor.check_open_positions (trigger: interval[0:01:00], next run at: 2026-01-14 12:20:47 CET)\" executed successfully\n", - "2026-01-14 12:19:47,907 - INFO - Running job \" (trigger: interval[0:01:00], next run at: 2026-01-14 12:20:47 CET)\" (scheduled at 2026-01-14 12:19:47.242309+01:00)\n", - "2026-01-14 12:19:47,909 - INFO - \n", + "2026-01-14 13:37:41,854 - INFO - πŸ“Š Partial TP Levels:\n", + "2026-01-14 13:37:41,855 - INFO - Entry: 4635.22000\n", + "2026-01-14 13:37:41,856 - INFO - SL: 4630.44000\n", + "2026-01-14 13:37:41,857 - INFO - Risk: 4.78000\n", + "2026-01-14 13:37:41,857 - INFO - TP1 (1.5R): 4642.39000\n", + "2026-01-14 13:37:41,859 - INFO - TP2 (2.5R): 4647.17000\n", + "2026-01-14 13:37:41,860 - INFO - Job \" (trigger: interval[0:01:00], next run at: 2026-01-14 13:38:41 CET)\" executed successfully\n", + "2026-01-14 13:37:41,919 - INFO - Job \"PositionMonitor.check_open_positions (trigger: interval[0:01:00], next run at: 2026-01-14 13:38:41 CET)\" executed successfully\n", + "2026-01-14 13:37:45,341 - INFO - HTTP Request: POST https://api.telegram.org/bot7783303065:AAHVVvwWGqmhJ2BVq8LqkLRSsicKy1CUsD8/getUpdates \"HTTP/1.1 200 OK\"\n", + "2026-01-14 13:37:55,355 - INFO - HTTP Request: POST https://api.telegram.org/bot7783303065:AAHVVvwWGqmhJ2BVq8LqkLRSsicKy1CUsD8/getUpdates \"HTTP/1.1 200 OK\"\n", + "2026-01-14 13:38:00,012 - INFO - Running job \"create_protected_trading_check..protected_check (trigger: cron[minute='*'], next run at: 2026-01-14 13:39:00 CET)\" (scheduled at 2026-01-14 13:38:00+01:00)\n", + "2026-01-14 13:38:00,012 - INFO - ⏸️ Trading SKIP: London blocked: 12.5% win-rate, -$10/trade\n", + "2026-01-14 13:38:00,103 - INFO - Job \"create_protected_trading_check..protected_check (trigger: cron[minute='*'], next run at: 2026-01-14 13:39:00 CET)\" executed successfully\n", + "2026-01-14 13:38:05,373 - INFO - HTTP Request: POST https://api.telegram.org/bot7783303065:AAHVVvwWGqmhJ2BVq8LqkLRSsicKy1CUsD8/getUpdates \"HTTP/1.1 200 OK\"\n", + "2026-01-14 13:38:15,418 - INFO - HTTP Request: POST https://api.telegram.org/bot7783303065:AAHVVvwWGqmhJ2BVq8LqkLRSsicKy1CUsD8/getUpdates \"HTTP/1.1 200 OK\"\n", + "2026-01-14 13:38:25,445 - INFO - HTTP Request: POST https://api.telegram.org/bot7783303065:AAHVVvwWGqmhJ2BVq8LqkLRSsicKy1CUsD8/getUpdates \"HTTP/1.1 200 OK\"\n", + "2026-01-14 13:38:35,475 - INFO - HTTP Request: POST https://api.telegram.org/bot7783303065:AAHVVvwWGqmhJ2BVq8LqkLRSsicKy1CUsD8/getUpdates \"HTTP/1.1 200 OK\"\n", + "2026-01-14 13:38:43,049 - WARNING - Run time of job \"PositionMonitor.check_open_positions (trigger: interval[0:01:00], next run at: 2026-01-14 13:39:41 CET)\" was missed by 0:00:01.218758\n", + "2026-01-14 13:38:43,063 - WARNING - Run time of job \" (trigger: interval[0:01:00], next run at: 2026-01-14 13:39:41 CET)\" was missed by 0:00:01.228782\n", + "2026-01-14 13:38:45,507 - INFO - HTTP Request: POST https://api.telegram.org/bot7783303065:AAHVVvwWGqmhJ2BVq8LqkLRSsicKy1CUsD8/getUpdates \"HTTP/1.1 200 OK\"\n", + "2026-01-14 13:38:55,537 - INFO - HTTP Request: POST https://api.telegram.org/bot7783303065:AAHVVvwWGqmhJ2BVq8LqkLRSsicKy1CUsD8/getUpdates \"HTTP/1.1 200 OK\"\n", + "2026-01-14 13:39:00,039 - INFO - Running job \"create_protected_trading_check..protected_check (trigger: cron[minute='*'], next run at: 2026-01-14 13:40:00 CET)\" (scheduled at 2026-01-14 13:39:00+01:00)\n", + "2026-01-14 13:39:00,046 - INFO - ⏸️ Trading SKIP: London blocked: 12.5% win-rate, -$10/trade\n", + "2026-01-14 13:39:00,048 - INFO - Job \"create_protected_trading_check..protected_check (trigger: cron[minute='*'], next run at: 2026-01-14 13:40:00 CET)\" executed successfully\n", + "2026-01-14 13:39:05,565 - INFO - HTTP Request: POST https://api.telegram.org/bot7783303065:AAHVVvwWGqmhJ2BVq8LqkLRSsicKy1CUsD8/getUpdates \"HTTP/1.1 200 OK\"\n", + "2026-01-14 13:39:15,593 - INFO - HTTP Request: POST https://api.telegram.org/bot7783303065:AAHVVvwWGqmhJ2BVq8LqkLRSsicKy1CUsD8/getUpdates \"HTTP/1.1 200 OK\"\n", + "2026-01-14 13:39:25,764 - INFO - HTTP Request: POST https://api.telegram.org/bot7783303065:AAHVVvwWGqmhJ2BVq8LqkLRSsicKy1CUsD8/getUpdates \"HTTP/1.1 200 OK\"\n", + "2026-01-14 13:39:35,792 - INFO - HTTP Request: POST https://api.telegram.org/bot7783303065:AAHVVvwWGqmhJ2BVq8LqkLRSsicKy1CUsD8/getUpdates \"HTTP/1.1 200 OK\"\n", + "2026-01-14 13:39:41,855 - INFO - Running job \"PositionMonitor.check_open_positions (trigger: interval[0:01:00], next run at: 2026-01-14 13:40:41 CET)\" (scheduled at 2026-01-14 13:39:41.830706+01:00)\n", + "2026-01-14 13:39:41,857 - INFO - Job \"PositionMonitor.check_open_positions (trigger: interval[0:01:00], next run at: 2026-01-14 13:40:41 CET)\" executed successfully\n", + "2026-01-14 13:39:41,858 - INFO - Running job \" (trigger: interval[0:01:00], next run at: 2026-01-14 13:40:41 CET)\" (scheduled at 2026-01-14 13:39:41.832703+01:00)\n", + "2026-01-14 13:39:41,859 - INFO - \n", "πŸ” Checking 1 position(s) for XAUUSD...\n", - "2026-01-14 12:19:47,910 - INFO - πŸ“Š Partial TP Levels:\n", - "2026-01-14 12:19:47,911 - INFO - Entry: 4636.11000\n", - "2026-01-14 12:19:47,911 - INFO - SL: 4631.52000\n", - "2026-01-14 12:19:47,912 - INFO - Risk: 4.59000\n", - "2026-01-14 12:19:47,913 - INFO - TP1 (1.5R): 4642.99500\n", - "2026-01-14 12:19:47,914 - INFO - TP2 (2.5R): 4647.58500\n", - "2026-01-14 12:19:47,915 - INFO - Job \" (trigger: interval[0:01:00], next run at: 2026-01-14 12:20:47 CET)\" executed successfully\n", - "2026-01-14 12:19:52,965 - INFO - HTTP Request: POST https://api.telegram.org/bot7783303065:AAHVVvwWGqmhJ2BVq8LqkLRSsicKy1CUsD8/getUpdates \"HTTP/1.1 200 OK\"\n", - "2026-01-14 12:20:00,385 - INFO - Running job \"create_protected_trading_check..protected_check (trigger: cron[minute='*'], next run at: 2026-01-14 12:21:00 CET)\" (scheduled at 2026-01-14 12:20:00+01:00)\n", - "2026-01-14 12:20:00,388 - INFO - ⏸️ Trading SKIP: London blocked: 12.5% win-rate, -$10/trade\n", - "2026-01-14 12:20:00,390 - INFO - Job \"create_protected_trading_check..protected_check (trigger: cron[minute='*'], next run at: 2026-01-14 12:21:00 CET)\" executed successfully\n", - "2026-01-14 12:20:02,988 - INFO - HTTP Request: POST https://api.telegram.org/bot7783303065:AAHVVvwWGqmhJ2BVq8LqkLRSsicKy1CUsD8/getUpdates \"HTTP/1.1 200 OK\"\n", - "2026-01-14 12:20:13,013 - INFO - HTTP Request: POST https://api.telegram.org/bot7783303065:AAHVVvwWGqmhJ2BVq8LqkLRSsicKy1CUsD8/getUpdates \"HTTP/1.1 200 OK\"\n", - "2026-01-14 12:20:23,036 - INFO - HTTP Request: POST https://api.telegram.org/bot7783303065:AAHVVvwWGqmhJ2BVq8LqkLRSsicKy1CUsD8/getUpdates \"HTTP/1.1 200 OK\"\n", - "2026-01-14 12:20:33,065 - INFO - HTTP Request: POST https://api.telegram.org/bot7783303065:AAHVVvwWGqmhJ2BVq8LqkLRSsicKy1CUsD8/getUpdates \"HTTP/1.1 200 OK\"\n", - "2026-01-14 12:20:43,090 - INFO - HTTP Request: POST https://api.telegram.org/bot7783303065:AAHVVvwWGqmhJ2BVq8LqkLRSsicKy1CUsD8/getUpdates \"HTTP/1.1 200 OK\"\n", - "2026-01-14 12:20:47,240 - INFO - Running job \"PositionMonitor.check_open_positions (trigger: interval[0:01:00], next run at: 2026-01-14 12:21:47 CET)\" (scheduled at 2026-01-14 12:20:47.237307+01:00)\n", - "2026-01-14 12:20:47,730 - INFO - Job \"PositionMonitor.check_open_positions (trigger: interval[0:01:00], next run at: 2026-01-14 12:21:47 CET)\" executed successfully\n", - "2026-01-14 12:20:47,845 - INFO - Running job \" (trigger: interval[0:01:00], next run at: 2026-01-14 12:21:47 CET)\" (scheduled at 2026-01-14 12:20:47.242309+01:00)\n", - "2026-01-14 12:20:47,847 - INFO - \n", + "2026-01-14 13:39:41,861 - INFO - πŸ“Š Partial TP Levels:\n", + "2026-01-14 13:39:41,876 - INFO - Entry: 4635.22000\n", + "2026-01-14 13:39:41,878 - INFO - SL: 4630.44000\n", + "2026-01-14 13:39:41,879 - INFO - Risk: 4.78000\n", + "2026-01-14 13:39:41,881 - INFO - TP1 (1.5R): 4642.39000\n", + "2026-01-14 13:39:41,882 - INFO - TP2 (2.5R): 4647.17000\n", + "2026-01-14 13:39:41,883 - INFO - Job \" (trigger: interval[0:01:00], next run at: 2026-01-14 13:40:41 CET)\" executed successfully\n", + "2026-01-14 13:39:45,829 - INFO - HTTP Request: POST https://api.telegram.org/bot7783303065:AAHVVvwWGqmhJ2BVq8LqkLRSsicKy1CUsD8/getUpdates \"HTTP/1.1 200 OK\"\n", + "2026-01-14 13:39:55,884 - INFO - HTTP Request: POST https://api.telegram.org/bot7783303065:AAHVVvwWGqmhJ2BVq8LqkLRSsicKy1CUsD8/getUpdates \"HTTP/1.1 200 OK\"\n", + "2026-01-14 13:40:00,498 - INFO - Running job \"create_protected_trading_check..protected_check (trigger: cron[minute='*'], next run at: 2026-01-14 13:41:00 CET)\" (scheduled at 2026-01-14 13:40:00+01:00)\n", + "2026-01-14 13:40:01,093 - INFO - ⏸️ Trading SKIP: London blocked: 12.5% win-rate, -$10/trade\n", + "2026-01-14 13:40:01,106 - INFO - Job \"create_protected_trading_check..protected_check (trigger: cron[minute='*'], next run at: 2026-01-14 13:41:00 CET)\" executed successfully\n", + "2026-01-14 13:40:05,908 - INFO - HTTP Request: POST https://api.telegram.org/bot7783303065:AAHVVvwWGqmhJ2BVq8LqkLRSsicKy1CUsD8/getUpdates \"HTTP/1.1 200 OK\"\n", + "2026-01-14 13:40:15,937 - INFO - HTTP Request: POST https://api.telegram.org/bot7783303065:AAHVVvwWGqmhJ2BVq8LqkLRSsicKy1CUsD8/getUpdates \"HTTP/1.1 200 OK\"\n", + "2026-01-14 13:40:25,960 - INFO - HTTP Request: POST https://api.telegram.org/bot7783303065:AAHVVvwWGqmhJ2BVq8LqkLRSsicKy1CUsD8/getUpdates \"HTTP/1.1 200 OK\"\n", + "2026-01-14 13:40:35,988 - INFO - HTTP Request: POST https://api.telegram.org/bot7783303065:AAHVVvwWGqmhJ2BVq8LqkLRSsicKy1CUsD8/getUpdates \"HTTP/1.1 200 OK\"\n", + "2026-01-14 13:40:41,841 - INFO - Running job \"PositionMonitor.check_open_positions (trigger: interval[0:01:00], next run at: 2026-01-14 13:41:41 CET)\" (scheduled at 2026-01-14 13:40:41.830706+01:00)\n", + "2026-01-14 13:40:41,844 - INFO - Job \"PositionMonitor.check_open_positions (trigger: interval[0:01:00], next run at: 2026-01-14 13:41:41 CET)\" executed successfully\n", + "2026-01-14 13:40:41,843 - INFO - Running job \" (trigger: interval[0:01:00], next run at: 2026-01-14 13:41:41 CET)\" (scheduled at 2026-01-14 13:40:41.832703+01:00)\n", + "2026-01-14 13:40:41,852 - INFO - \n", "πŸ” Checking 1 position(s) for XAUUSD...\n", - "2026-01-14 12:20:47,848 - INFO - πŸ“Š Partial TP Levels:\n", - "2026-01-14 12:20:47,849 - INFO - Entry: 4636.11000\n", - "2026-01-14 12:20:47,851 - INFO - SL: 4631.52000\n", - "2026-01-14 12:20:47,852 - INFO - Risk: 4.59000\n", - "2026-01-14 12:20:47,853 - INFO - TP1 (1.5R): 4642.99500\n", - "2026-01-14 12:20:47,854 - INFO - TP2 (2.5R): 4647.58500\n", - "2026-01-14 12:20:47,856 - INFO - Job \" (trigger: interval[0:01:00], next run at: 2026-01-14 12:21:47 CET)\" executed successfully\n", - "2026-01-14 12:20:53,115 - INFO - HTTP Request: POST https://api.telegram.org/bot7783303065:AAHVVvwWGqmhJ2BVq8LqkLRSsicKy1CUsD8/getUpdates \"HTTP/1.1 200 OK\"\n", - "2026-01-14 12:21:00,001 - INFO - Running job \"create_protected_trading_check..protected_check (trigger: cron[minute='*'], next run at: 2026-01-14 12:22:00 CET)\" (scheduled at 2026-01-14 12:21:00+01:00)\n", - "2026-01-14 12:21:00,006 - INFO - ⏸️ Trading SKIP: London blocked: 12.5% win-rate, -$10/trade\n", - "2026-01-14 12:21:00,008 - INFO - Job \"create_protected_trading_check..protected_check (trigger: cron[minute='*'], next run at: 2026-01-14 12:22:00 CET)\" executed successfully\n", - "2026-01-14 12:21:03,152 - INFO - HTTP Request: POST https://api.telegram.org/bot7783303065:AAHVVvwWGqmhJ2BVq8LqkLRSsicKy1CUsD8/getUpdates \"HTTP/1.1 200 OK\"\n", - "2026-01-14 12:21:13,177 - INFO - HTTP Request: POST https://api.telegram.org/bot7783303065:AAHVVvwWGqmhJ2BVq8LqkLRSsicKy1CUsD8/getUpdates \"HTTP/1.1 200 OK\"\n", - "2026-01-14 12:21:23,199 - INFO - HTTP Request: POST https://api.telegram.org/bot7783303065:AAHVVvwWGqmhJ2BVq8LqkLRSsicKy1CUsD8/getUpdates \"HTTP/1.1 200 OK\"\n", - "2026-01-14 12:21:33,228 - INFO - HTTP Request: POST https://api.telegram.org/bot7783303065:AAHVVvwWGqmhJ2BVq8LqkLRSsicKy1CUsD8/getUpdates \"HTTP/1.1 200 OK\"\n", - "2026-01-14 12:21:43,255 - INFO - HTTP Request: POST https://api.telegram.org/bot7783303065:AAHVVvwWGqmhJ2BVq8LqkLRSsicKy1CUsD8/getUpdates \"HTTP/1.1 200 OK\"\n", - "2026-01-14 12:21:47,560 - INFO - Running job \"PositionMonitor.check_open_positions (trigger: interval[0:01:00], next run at: 2026-01-14 12:22:47 CET)\" (scheduled at 2026-01-14 12:21:47.237307+01:00)\n", - "2026-01-14 12:21:47,665 - INFO - Job \"PositionMonitor.check_open_positions (trigger: interval[0:01:00], next run at: 2026-01-14 12:22:47 CET)\" executed successfully\n", - "2026-01-14 12:21:49,288 - WARNING - Run time of job \" (trigger: interval[0:01:00], next run at: 2026-01-14 12:21:47 CET)\" was missed by 0:00:02.046442\n", - "2026-01-14 12:21:53,279 - INFO - HTTP Request: POST https://api.telegram.org/bot7783303065:AAHVVvwWGqmhJ2BVq8LqkLRSsicKy1CUsD8/getUpdates \"HTTP/1.1 200 OK\"\n", - "2026-01-14 12:22:00,002 - INFO - Running job \"create_protected_trading_check..protected_check (trigger: cron[minute='*'], next run at: 2026-01-14 12:23:00 CET)\" (scheduled at 2026-01-14 12:22:00+01:00)\n", - "2026-01-14 12:22:00,019 - INFO - ⏸️ Trading SKIP: London blocked: 12.5% win-rate, -$10/trade\n", - "2026-01-14 12:22:00,022 - INFO - Job \"create_protected_trading_check..protected_check (trigger: cron[minute='*'], next run at: 2026-01-14 12:23:00 CET)\" executed successfully\n", - "2026-01-14 12:22:03,448 - INFO - HTTP Request: POST https://api.telegram.org/bot7783303065:AAHVVvwWGqmhJ2BVq8LqkLRSsicKy1CUsD8/getUpdates \"HTTP/1.1 200 OK\"\n", - "2026-01-14 12:22:13,474 - INFO - HTTP Request: POST https://api.telegram.org/bot7783303065:AAHVVvwWGqmhJ2BVq8LqkLRSsicKy1CUsD8/getUpdates \"HTTP/1.1 200 OK\"\n", - "2026-01-14 12:22:23,531 - INFO - HTTP Request: POST https://api.telegram.org/bot7783303065:AAHVVvwWGqmhJ2BVq8LqkLRSsicKy1CUsD8/getUpdates \"HTTP/1.1 200 OK\"\n", - "2026-01-14 12:22:33,561 - INFO - HTTP Request: POST https://api.telegram.org/bot7783303065:AAHVVvwWGqmhJ2BVq8LqkLRSsicKy1CUsD8/getUpdates \"HTTP/1.1 200 OK\"\n", - "2026-01-14 12:22:43,585 - INFO - HTTP Request: POST https://api.telegram.org/bot7783303065:AAHVVvwWGqmhJ2BVq8LqkLRSsicKy1CUsD8/getUpdates \"HTTP/1.1 200 OK\"\n", - "2026-01-14 12:22:48,377 - WARNING - Run time of job \"PositionMonitor.check_open_positions (trigger: interval[0:01:00], next run at: 2026-01-14 12:23:47 CET)\" was missed by 0:00:01.140674\n", - "2026-01-14 12:22:48,379 - WARNING - Run time of job \" (trigger: interval[0:01:00], next run at: 2026-01-14 12:23:47 CET)\" was missed by 0:00:01.137668\n" + "2026-01-14 13:40:41,854 - INFO - πŸ“Š Partial TP Levels:\n", + "2026-01-14 13:40:41,856 - INFO - Entry: 4635.22000\n", + "2026-01-14 13:40:41,858 - INFO - SL: 4630.44000\n", + "2026-01-14 13:40:41,859 - INFO - Risk: 4.78000\n", + "2026-01-14 13:40:41,860 - INFO - TP1 (1.5R): 4642.39000\n", + "2026-01-14 13:40:41,861 - INFO - TP2 (2.5R): 4647.17000\n", + "2026-01-14 13:40:41,864 - INFO - Job \" (trigger: interval[0:01:00], next run at: 2026-01-14 13:41:41 CET)\" executed successfully\n", + "2026-01-14 13:40:46,022 - INFO - HTTP Request: POST https://api.telegram.org/bot7783303065:AAHVVvwWGqmhJ2BVq8LqkLRSsicKy1CUsD8/getUpdates \"HTTP/1.1 200 OK\"\n", + "2026-01-14 13:40:56,047 - INFO - HTTP Request: POST https://api.telegram.org/bot7783303065:AAHVVvwWGqmhJ2BVq8LqkLRSsicKy1CUsD8/getUpdates \"HTTP/1.1 200 OK\"\n", + "2026-01-14 13:41:00,048 - INFO - Running job \"create_protected_trading_check..protected_check (trigger: cron[minute='*'], next run at: 2026-01-14 13:42:00 CET)\" (scheduled at 2026-01-14 13:41:00+01:00)\n", + "2026-01-14 13:41:00,056 - INFO - ⏸️ Trading SKIP: London blocked: 12.5% win-rate, -$10/trade\n", + "2026-01-14 13:41:00,060 - INFO - Job \"create_protected_trading_check..protected_check (trigger: cron[minute='*'], next run at: 2026-01-14 13:42:00 CET)\" executed successfully\n", + "2026-01-14 13:41:06,075 - INFO - HTTP Request: POST https://api.telegram.org/bot7783303065:AAHVVvwWGqmhJ2BVq8LqkLRSsicKy1CUsD8/getUpdates \"HTTP/1.1 200 OK\"\n", + "2026-01-14 13:41:16,098 - INFO - HTTP Request: POST https://api.telegram.org/bot7783303065:AAHVVvwWGqmhJ2BVq8LqkLRSsicKy1CUsD8/getUpdates \"HTTP/1.1 200 OK\"\n", + "2026-01-14 13:41:26,129 - INFO - HTTP Request: POST https://api.telegram.org/bot7783303065:AAHVVvwWGqmhJ2BVq8LqkLRSsicKy1CUsD8/getUpdates \"HTTP/1.1 200 OK\"\n", + "2026-01-14 13:41:36,150 - INFO - HTTP Request: POST https://api.telegram.org/bot7783303065:AAHVVvwWGqmhJ2BVq8LqkLRSsicKy1CUsD8/getUpdates \"HTTP/1.1 200 OK\"\n", + "2026-01-14 13:41:41,844 - INFO - Running job \"PositionMonitor.check_open_positions (trigger: interval[0:01:00], next run at: 2026-01-14 13:42:41 CET)\" (scheduled at 2026-01-14 13:41:41.830706+01:00)\n", + "2026-01-14 13:41:41,846 - INFO - Job \"PositionMonitor.check_open_positions (trigger: interval[0:01:00], next run at: 2026-01-14 13:42:41 CET)\" executed successfully\n", + "2026-01-14 13:41:41,847 - INFO - Running job \" (trigger: interval[0:01:00], next run at: 2026-01-14 13:42:41 CET)\" (scheduled at 2026-01-14 13:41:41.832703+01:00)\n", + "2026-01-14 13:41:41,858 - INFO - \n", + "πŸ” Checking 1 position(s) for XAUUSD...\n", + "2026-01-14 13:41:41,860 - INFO - πŸ“Š Partial TP Levels:\n", + "2026-01-14 13:41:41,860 - INFO - Entry: 4635.22000\n", + "2026-01-14 13:41:41,861 - INFO - SL: 4630.44000\n", + "2026-01-14 13:41:41,862 - INFO - Risk: 4.78000\n", + "2026-01-14 13:41:41,864 - INFO - TP1 (1.5R): 4642.39000\n", + "2026-01-14 13:41:41,866 - INFO - TP2 (2.5R): 4647.17000\n", + "2026-01-14 13:41:41,867 - INFO - Job \" (trigger: interval[0:01:00], next run at: 2026-01-14 13:42:41 CET)\" executed successfully\n", + "2026-01-14 13:41:46,183 - INFO - HTTP Request: POST https://api.telegram.org/bot7783303065:AAHVVvwWGqmhJ2BVq8LqkLRSsicKy1CUsD8/getUpdates \"HTTP/1.1 200 OK\"\n", + "2026-01-14 13:41:56,210 - INFO - HTTP Request: POST https://api.telegram.org/bot7783303065:AAHVVvwWGqmhJ2BVq8LqkLRSsicKy1CUsD8/getUpdates \"HTTP/1.1 200 OK\"\n", + "2026-01-14 13:42:00,007 - INFO - Running job \"create_protected_trading_check..protected_check (trigger: cron[minute='*'], next run at: 2026-01-14 13:43:00 CET)\" (scheduled at 2026-01-14 13:42:00+01:00)\n", + "2026-01-14 13:42:00,159 - INFO - ⏸️ Trading SKIP: London blocked: 12.5% win-rate, -$10/trade\n", + "2026-01-14 13:42:00,199 - INFO - Job \"create_protected_trading_check..protected_check (trigger: cron[minute='*'], next run at: 2026-01-14 13:43:00 CET)\" executed successfully\n", + "2026-01-14 13:42:06,234 - INFO - HTTP Request: POST https://api.telegram.org/bot7783303065:AAHVVvwWGqmhJ2BVq8LqkLRSsicKy1CUsD8/getUpdates \"HTTP/1.1 200 OK\"\n", + "2026-01-14 13:42:16,258 - INFO - HTTP Request: POST https://api.telegram.org/bot7783303065:AAHVVvwWGqmhJ2BVq8LqkLRSsicKy1CUsD8/getUpdates \"HTTP/1.1 200 OK\"\n", + "2026-01-14 13:42:26,281 - INFO - HTTP Request: POST https://api.telegram.org/bot7783303065:AAHVVvwWGqmhJ2BVq8LqkLRSsicKy1CUsD8/getUpdates \"HTTP/1.1 200 OK\"\n", + "2026-01-14 13:42:36,330 - INFO - HTTP Request: POST https://api.telegram.org/bot7783303065:AAHVVvwWGqmhJ2BVq8LqkLRSsicKy1CUsD8/getUpdates \"HTTP/1.1 200 OK\"\n", + "2026-01-14 13:42:41,847 - INFO - Running job \"PositionMonitor.check_open_positions (trigger: interval[0:01:00], next run at: 2026-01-14 13:43:41 CET)\" (scheduled at 2026-01-14 13:42:41.830706+01:00)\n", + "2026-01-14 13:42:41,849 - INFO - Job \"PositionMonitor.check_open_positions (trigger: interval[0:01:00], next run at: 2026-01-14 13:43:41 CET)\" executed successfully\n", + "2026-01-14 13:42:41,850 - INFO - Running job \" (trigger: interval[0:01:00], next run at: 2026-01-14 13:43:41 CET)\" (scheduled at 2026-01-14 13:42:41.832703+01:00)\n", + "2026-01-14 13:42:41,852 - INFO - \n", + "πŸ” Checking 1 position(s) for XAUUSD...\n", + "2026-01-14 13:42:41,853 - INFO - πŸ“Š Partial TP Levels:\n", + "2026-01-14 13:42:41,854 - INFO - Entry: 4635.22000\n", + "2026-01-14 13:42:41,855 - INFO - SL: 4630.44000\n", + "2026-01-14 13:42:41,856 - INFO - Risk: 4.78000\n", + "2026-01-14 13:42:41,857 - INFO - TP1 (1.5R): 4642.39000\n", + "2026-01-14 13:42:41,858 - INFO - TP2 (2.5R): 4647.17000\n", + "2026-01-14 13:42:41,859 - INFO - Job \" (trigger: interval[0:01:00], next run at: 2026-01-14 13:43:41 CET)\" executed successfully\n", + "2026-01-14 13:42:46,366 - INFO - HTTP Request: POST https://api.telegram.org/bot7783303065:AAHVVvwWGqmhJ2BVq8LqkLRSsicKy1CUsD8/getUpdates \"HTTP/1.1 200 OK\"\n", + "2026-01-14 13:42:56,390 - INFO - HTTP Request: POST https://api.telegram.org/bot7783303065:AAHVVvwWGqmhJ2BVq8LqkLRSsicKy1CUsD8/getUpdates \"HTTP/1.1 200 OK\"\n", + "2026-01-14 13:43:00,556 - INFO - Running job \"create_protected_trading_check..protected_check (trigger: cron[minute='*'], next run at: 2026-01-14 13:44:00 CET)\" (scheduled at 2026-01-14 13:43:00+01:00)\n", + "2026-01-14 13:43:00,560 - INFO - ⏸️ Trading SKIP: London blocked: 12.5% win-rate, -$10/trade\n", + "2026-01-14 13:43:00,562 - INFO - Job \"create_protected_trading_check..protected_check (trigger: cron[minute='*'], next run at: 2026-01-14 13:44:00 CET)\" executed successfully\n", + "2026-01-14 13:43:06,417 - INFO - HTTP Request: POST https://api.telegram.org/bot7783303065:AAHVVvwWGqmhJ2BVq8LqkLRSsicKy1CUsD8/getUpdates \"HTTP/1.1 200 OK\"\n", + "2026-01-14 13:43:16,442 - INFO - HTTP Request: POST https://api.telegram.org/bot7783303065:AAHVVvwWGqmhJ2BVq8LqkLRSsicKy1CUsD8/getUpdates \"HTTP/1.1 200 OK\"\n", + "2026-01-14 13:43:26,466 - INFO - HTTP Request: POST https://api.telegram.org/bot7783303065:AAHVVvwWGqmhJ2BVq8LqkLRSsicKy1CUsD8/getUpdates \"HTTP/1.1 200 OK\"\n", + "2026-01-14 13:43:36,493 - INFO - HTTP Request: POST https://api.telegram.org/bot7783303065:AAHVVvwWGqmhJ2BVq8LqkLRSsicKy1CUsD8/getUpdates \"HTTP/1.1 200 OK\"\n", + "2026-01-14 13:43:41,832 - INFO - Running job \"PositionMonitor.check_open_positions (trigger: interval[0:01:00], next run at: 2026-01-14 13:44:41 CET)\" (scheduled at 2026-01-14 13:43:41.830706+01:00)\n", + "2026-01-14 13:43:41,834 - INFO - Job \"PositionMonitor.check_open_positions (trigger: interval[0:01:00], next run at: 2026-01-14 13:44:41 CET)\" executed successfully\n", + "2026-01-14 13:43:41,851 - INFO - Running job \" (trigger: interval[0:01:00], next run at: 2026-01-14 13:44:41 CET)\" (scheduled at 2026-01-14 13:43:41.832703+01:00)\n", + "2026-01-14 13:43:41,854 - INFO - \n", + "πŸ” Checking 1 position(s) for XAUUSD...\n", + "2026-01-14 13:43:41,921 - INFO - πŸ“Š Partial TP Levels:\n", + "2026-01-14 13:43:41,925 - INFO - Entry: 4635.22000\n", + "2026-01-14 13:43:41,926 - INFO - SL: 4630.44000\n", + "2026-01-14 13:43:41,927 - INFO - Risk: 4.78000\n", + "2026-01-14 13:43:41,952 - INFO - TP1 (1.5R): 4642.39000\n", + "2026-01-14 13:43:41,954 - INFO - TP2 (2.5R): 4647.17000\n", + "2026-01-14 13:43:41,955 - INFO - Job \" (trigger: interval[0:01:00], next run at: 2026-01-14 13:44:41 CET)\" executed successfully\n", + "2026-01-14 13:43:46,529 - INFO - HTTP Request: POST https://api.telegram.org/bot7783303065:AAHVVvwWGqmhJ2BVq8LqkLRSsicKy1CUsD8/getUpdates \"HTTP/1.1 200 OK\"\n", + "2026-01-14 13:43:56,555 - INFO - HTTP Request: POST https://api.telegram.org/bot7783303065:AAHVVvwWGqmhJ2BVq8LqkLRSsicKy1CUsD8/getUpdates \"HTTP/1.1 200 OK\"\n", + "2026-01-14 13:44:00,206 - INFO - Running job \"create_protected_trading_check..protected_check (trigger: cron[minute='*'], next run at: 2026-01-14 13:45:00 CET)\" (scheduled at 2026-01-14 13:44:00+01:00)\n", + "2026-01-14 13:44:00,209 - INFO - ⏸️ Trading SKIP: London blocked: 12.5% win-rate, -$10/trade\n", + "2026-01-14 13:44:00,210 - INFO - Job \"create_protected_trading_check..protected_check (trigger: cron[minute='*'], next run at: 2026-01-14 13:45:00 CET)\" executed successfully\n", + "2026-01-14 13:44:06,578 - INFO - HTTP Request: POST https://api.telegram.org/bot7783303065:AAHVVvwWGqmhJ2BVq8LqkLRSsicKy1CUsD8/getUpdates \"HTTP/1.1 200 OK\"\n", + "2026-01-14 13:44:16,602 - INFO - HTTP Request: POST https://api.telegram.org/bot7783303065:AAHVVvwWGqmhJ2BVq8LqkLRSsicKy1CUsD8/getUpdates \"HTTP/1.1 200 OK\"\n", + "2026-01-14 13:44:26,634 - INFO - HTTP Request: POST https://api.telegram.org/bot7783303065:AAHVVvwWGqmhJ2BVq8LqkLRSsicKy1CUsD8/getUpdates \"HTTP/1.1 200 OK\"\n", + "2026-01-14 13:44:36,657 - INFO - HTTP Request: POST https://api.telegram.org/bot7783303065:AAHVVvwWGqmhJ2BVq8LqkLRSsicKy1CUsD8/getUpdates \"HTTP/1.1 200 OK\"\n", + "2026-01-14 13:44:41,831 - INFO - Running job \"PositionMonitor.check_open_positions (trigger: interval[0:01:00], next run at: 2026-01-14 13:45:41 CET)\" (scheduled at 2026-01-14 13:44:41.830706+01:00)\n", + "2026-01-14 13:44:41,833 - INFO - Job \"PositionMonitor.check_open_positions (trigger: interval[0:01:00], next run at: 2026-01-14 13:45:41 CET)\" executed successfully\n", + "2026-01-14 13:44:41,905 - INFO - Running job \" (trigger: interval[0:01:00], next run at: 2026-01-14 13:45:41 CET)\" (scheduled at 2026-01-14 13:44:41.832703+01:00)\n", + "2026-01-14 13:44:41,944 - INFO - \n", + "πŸ” Checking 1 position(s) for XAUUSD...\n", + "2026-01-14 13:44:42,041 - INFO - πŸ“Š Partial TP Levels:\n", + "2026-01-14 13:44:42,063 - INFO - Entry: 4635.22000\n", + "2026-01-14 13:44:42,064 - INFO - SL: 4630.44000\n", + "2026-01-14 13:44:42,070 - INFO - Risk: 4.78000\n", + "2026-01-14 13:44:42,070 - INFO - TP1 (1.5R): 4642.39000\n", + "2026-01-14 13:44:42,070 - INFO - TP2 (2.5R): 4647.17000\n", + "2026-01-14 13:44:42,070 - INFO - Job \" (trigger: interval[0:01:00], next run at: 2026-01-14 13:45:41 CET)\" executed successfully\n", + "2026-01-14 13:44:46,683 - INFO - HTTP Request: POST https://api.telegram.org/bot7783303065:AAHVVvwWGqmhJ2BVq8LqkLRSsicKy1CUsD8/getUpdates \"HTTP/1.1 200 OK\"\n", + "2026-01-14 13:44:56,708 - INFO - HTTP Request: POST https://api.telegram.org/bot7783303065:AAHVVvwWGqmhJ2BVq8LqkLRSsicKy1CUsD8/getUpdates \"HTTP/1.1 200 OK\"\n", + "2026-01-14 13:45:00,020 - INFO - Running job \"create_protected_trading_check..protected_check (trigger: cron[minute='*'], next run at: 2026-01-14 13:46:00 CET)\" (scheduled at 2026-01-14 13:45:00+01:00)\n", + "2026-01-14 13:45:00,023 - INFO - ⏸️ Trading SKIP: London blocked: 12.5% win-rate, -$10/trade\n", + "2026-01-14 13:45:00,028 - INFO - Job \"create_protected_trading_check..protected_check (trigger: cron[minute='*'], next run at: 2026-01-14 13:46:00 CET)\" executed successfully\n", + "2026-01-14 13:45:06,736 - INFO - HTTP Request: POST https://api.telegram.org/bot7783303065:AAHVVvwWGqmhJ2BVq8LqkLRSsicKy1CUsD8/getUpdates \"HTTP/1.1 200 OK\"\n", + "2026-01-14 13:45:16,765 - INFO - HTTP Request: POST https://api.telegram.org/bot7783303065:AAHVVvwWGqmhJ2BVq8LqkLRSsicKy1CUsD8/getUpdates \"HTTP/1.1 200 OK\"\n", + "2026-01-14 13:45:26,790 - INFO - HTTP Request: POST https://api.telegram.org/bot7783303065:AAHVVvwWGqmhJ2BVq8LqkLRSsicKy1CUsD8/getUpdates \"HTTP/1.1 200 OK\"\n", + "2026-01-14 13:45:36,813 - INFO - HTTP Request: POST https://api.telegram.org/bot7783303065:AAHVVvwWGqmhJ2BVq8LqkLRSsicKy1CUsD8/getUpdates \"HTTP/1.1 200 OK\"\n", + "2026-01-14 13:45:41,832 - INFO - Running job \"PositionMonitor.check_open_positions (trigger: interval[0:01:00], next run at: 2026-01-14 13:46:41 CET)\" (scheduled at 2026-01-14 13:45:41.830706+01:00)\n", + "2026-01-14 13:45:41,836 - INFO - Job \"PositionMonitor.check_open_positions (trigger: interval[0:01:00], next run at: 2026-01-14 13:46:41 CET)\" executed successfully\n", + "2026-01-14 13:45:41,834 - INFO - Running job \" (trigger: interval[0:01:00], next run at: 2026-01-14 13:46:41 CET)\" (scheduled at 2026-01-14 13:45:41.832703+01:00)\n", + "2026-01-14 13:45:41,851 - INFO - \n", + "πŸ” Checking 1 position(s) for XAUUSD...\n", + "2026-01-14 13:45:41,852 - INFO - πŸ“Š Partial TP Levels:\n", + "2026-01-14 13:45:41,853 - INFO - Entry: 4635.22000\n", + "2026-01-14 13:45:41,853 - INFO - SL: 4630.44000\n", + "2026-01-14 13:45:41,854 - INFO - Risk: 4.78000\n", + "2026-01-14 13:45:41,857 - INFO - TP1 (1.5R): 4642.39000\n", + "2026-01-14 13:45:41,859 - INFO - TP2 (2.5R): 4647.17000\n", + "2026-01-14 13:45:41,860 - INFO - Job \" (trigger: interval[0:01:00], next run at: 2026-01-14 13:46:41 CET)\" executed successfully\n", + "2026-01-14 13:45:46,839 - INFO - HTTP Request: POST https://api.telegram.org/bot7783303065:AAHVVvwWGqmhJ2BVq8LqkLRSsicKy1CUsD8/getUpdates \"HTTP/1.1 200 OK\"\n", + "2026-01-14 13:45:56,866 - INFO - HTTP Request: POST https://api.telegram.org/bot7783303065:AAHVVvwWGqmhJ2BVq8LqkLRSsicKy1CUsD8/getUpdates \"HTTP/1.1 200 OK\"\n", + "2026-01-14 13:46:00,001 - INFO - Running job \"create_protected_trading_check..protected_check (trigger: cron[minute='*'], next run at: 2026-01-14 13:47:00 CET)\" (scheduled at 2026-01-14 13:46:00+01:00)\n", + "2026-01-14 13:46:00,017 - INFO - ⏸️ Trading SKIP: London blocked: 12.5% win-rate, -$10/trade\n", + "2026-01-14 13:46:00,042 - INFO - Job \"create_protected_trading_check..protected_check (trigger: cron[minute='*'], next run at: 2026-01-14 13:47:00 CET)\" executed successfully\n", + "2026-01-14 13:46:06,888 - INFO - HTTP Request: POST https://api.telegram.org/bot7783303065:AAHVVvwWGqmhJ2BVq8LqkLRSsicKy1CUsD8/getUpdates \"HTTP/1.1 200 OK\"\n", + "2026-01-14 13:46:16,913 - INFO - HTTP Request: POST https://api.telegram.org/bot7783303065:AAHVVvwWGqmhJ2BVq8LqkLRSsicKy1CUsD8/getUpdates \"HTTP/1.1 200 OK\"\n", + "2026-01-14 13:46:26,941 - INFO - HTTP Request: POST https://api.telegram.org/bot7783303065:AAHVVvwWGqmhJ2BVq8LqkLRSsicKy1CUsD8/getUpdates \"HTTP/1.1 200 OK\"\n", + "2026-01-14 13:46:36,969 - INFO - HTTP Request: POST https://api.telegram.org/bot7783303065:AAHVVvwWGqmhJ2BVq8LqkLRSsicKy1CUsD8/getUpdates \"HTTP/1.1 200 OK\"\n", + "2026-01-14 13:46:41,852 - INFO - Running job \"PositionMonitor.check_open_positions (trigger: interval[0:01:00], next run at: 2026-01-14 13:47:41 CET)\" (scheduled at 2026-01-14 13:46:41.830706+01:00)\n", + "2026-01-14 13:46:41,854 - INFO - Job \"PositionMonitor.check_open_positions (trigger: interval[0:01:00], next run at: 2026-01-14 13:47:41 CET)\" executed successfully\n", + "2026-01-14 13:46:41,911 - INFO - Running job \" (trigger: interval[0:01:00], next run at: 2026-01-14 13:47:41 CET)\" (scheduled at 2026-01-14 13:46:41.832703+01:00)\n", + "2026-01-14 13:46:41,968 - INFO - \n", + "πŸ” Checking 1 position(s) for XAUUSD...\n", + "2026-01-14 13:46:41,970 - INFO - πŸ“Š Partial TP Levels:\n", + "2026-01-14 13:46:41,970 - INFO - Entry: 4635.22000\n", + "2026-01-14 13:46:41,978 - INFO - SL: 4630.44000\n", + "2026-01-14 13:46:41,980 - INFO - Risk: 4.78000\n", + "2026-01-14 13:46:41,981 - INFO - TP1 (1.5R): 4642.39000\n", + "2026-01-14 13:46:41,982 - INFO - TP2 (2.5R): 4647.17000\n", + "2026-01-14 13:46:41,983 - INFO - Job \" (trigger: interval[0:01:00], next run at: 2026-01-14 13:47:41 CET)\" executed successfully\n", + "2026-01-14 13:46:46,991 - INFO - HTTP Request: POST https://api.telegram.org/bot7783303065:AAHVVvwWGqmhJ2BVq8LqkLRSsicKy1CUsD8/getUpdates \"HTTP/1.1 200 OK\"\n", + "2026-01-14 13:46:57,016 - INFO - HTTP Request: POST https://api.telegram.org/bot7783303065:AAHVVvwWGqmhJ2BVq8LqkLRSsicKy1CUsD8/getUpdates \"HTTP/1.1 200 OK\"\n", + "2026-01-14 13:47:00,001 - INFO - Running job \"create_protected_trading_check..protected_check (trigger: cron[minute='*'], next run at: 2026-01-14 13:48:00 CET)\" (scheduled at 2026-01-14 13:47:00+01:00)\n", + "2026-01-14 13:47:00,005 - INFO - ⏸️ Trading SKIP: London blocked: 12.5% win-rate, -$10/trade\n", + "2026-01-14 13:47:00,007 - INFO - Job \"create_protected_trading_check..protected_check (trigger: cron[minute='*'], next run at: 2026-01-14 13:48:00 CET)\" executed successfully\n" ] } ], @@ -3985,4 +4153,4 @@ }, "nbformat": 4, "nbformat_minor": 4 -} \ No newline at end of file +} diff --git a/advanced_position_management.py b/advanced_position_management.py index 3651b42..a4a2117 100644 --- a/advanced_position_management.py +++ b/advanced_position_management.py @@ -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) diff --git a/session_filter_patch.py b/session_filter_patch.py index f35f5f2..6464b98 100644 --- a/session_filter_patch.py +++ b/session_filter_patch.py @@ -40,6 +40,11 @@ SESSION_WHITELIST_CONFIG = { 'max_risk_per_trade': 0.02, # Max Risk pro Trade (2%) - ErhΓΆht am 20.12.2025 fΓΌr Adaptive Sizing 'min_atr': 0.0008, # Minimum ATR fΓΌr Risk Filter + # Lot Sizing (14.01.2026) + 'min_lot': 0.10, # Minimum Lot Size + 'max_lot': 0.20, # Maximum Lot Size + 'default_lot': 0.10, # Default/Fallback Lot Size + # Trading Optionen 'risk_filter': True, # ATR-basierter Risk Filter 'use_pullback_entry': False, # Pullback Entry Strategie diff --git a/trade_performance_v16_XAUUSD_202601.json b/trade_performance_v16_XAUUSD_202601.json index 883b1d9..ee9f16f 100644 --- a/trade_performance_v16_XAUUSD_202601.json +++ b/trade_performance_v16_XAUUSD_202601.json @@ -2698,5 +2698,32 @@ }, "position_control_active": true, "order_result": "OrderSendResult(retcode=10009, deal=608743724, order=668660737, volume=0.01, price=4636.11, bid=0.0, ask=0.0, comment='Request executed', request_id=1587946349, retcode_external=0, request=TradeRequest(action=1, magic=234000, order=0, symbol='XAUUSD', volume=0.01, price=4636.11, stoplimit=0.0, sl=4631.522798769643, tp=4647.053003075894, deviation=20, type=0, type_filling=1, type_time=0, expiration=0, comment='TradingBot_V1.6', position=0, position_by=0))" + }, + { + "timestamp": "2026-01-14T13:36:45.332111", + "version": "V1.6_Adaptive_Complete", + "symbol": "XAUUSD", + "entry_signal": 1, + "confidence": 100.0, + "adaptive_threshold": 70, + "signal_quality": "excellent", + "market_regime": "ranging", + "regime_strength": 0.9313780689158762, + "risk_adjusted_strength": 213781.9730686972, + "adaptive_interval": 15, + "session": "london", + "relaxed_features": { + "pullback_entry_disabled": true, + "lower_confidence_threshold": true, + "lower_min_strength": true, + "fixed_tf_alignment": true + }, + "adaptive_features": { + "adaptive_rhythm": true, + "session_aware": true, + "volatility_based": true + }, + "position_control_active": true, + "order_result": "OrderSendResult(retcode=10009, deal=608970963, order=668899888, volume=0.01, price=4635.22, bid=0.0, ask=0.0, comment='Request executed', request_id=1587946350, retcode_external=0, request=TradeRequest(action=1, magic=234000, order=0, symbol='XAUUSD', volume=0.01, price=4635.39, stoplimit=0.0, sl=4630.437135255516, tp=4647.107161861209, deviation=20, type=0, type_filling=1, type_time=0, expiration=0, comment='TradingBot_V1.6', position=0, position_by=0))" } ] \ No newline at end of file