Update: sync latest notebook and add December 2025 trade performance data
Deploy to Windows VPS / deploy (push) Has been cancelled
Deploy to Windows VPS / deploy (push) Has been cancelled
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,577 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
"""
|
||||||
|
TradingBot V1.6 MT5 Profitability Analyzer
|
||||||
|
Holt Trade-Historie aus MT5 und berechnet echte Performance
|
||||||
|
"""
|
||||||
|
|
||||||
|
import MetaTrader5 as mt
|
||||||
|
import json
|
||||||
|
import glob
|
||||||
|
from datetime import datetime, timedelta
|
||||||
|
from collections import defaultdict
|
||||||
|
import keyring as kr
|
||||||
|
|
||||||
|
|
||||||
|
class MT5ProfitabilityAnalyzer:
|
||||||
|
"""Analysiert echte Trading-Performance aus MT5"""
|
||||||
|
|
||||||
|
def __init__(self, strategy_name="TradingBot_V1.6", symbol="XAUUSD"):
|
||||||
|
self.strategy_name = strategy_name
|
||||||
|
self.symbol = symbol
|
||||||
|
self.json_trades = []
|
||||||
|
self.mt5_deals = []
|
||||||
|
self.mt5_positions = []
|
||||||
|
self.matched_trades = []
|
||||||
|
self.stats = {}
|
||||||
|
|
||||||
|
def connect_mt5(self):
|
||||||
|
"""Verbindet zu MT5"""
|
||||||
|
print("🔌 Verbinde zu MT5...")
|
||||||
|
|
||||||
|
if not mt.initialize():
|
||||||
|
print(f"❌ MT5 Initialisierung fehlgeschlagen: {mt.last_error()}")
|
||||||
|
return False
|
||||||
|
|
||||||
|
# Login (wie im Bot)
|
||||||
|
login = 10800246
|
||||||
|
server = 'VantageInternational-Demo'
|
||||||
|
password = kr.get_password(server, str(login))
|
||||||
|
|
||||||
|
if not mt.login(login, password, server):
|
||||||
|
print(f"❌ MT5 Login fehlgeschlagen: {mt.last_error()}")
|
||||||
|
return False
|
||||||
|
|
||||||
|
account_info = mt.account_info()
|
||||||
|
if account_info:
|
||||||
|
print(f"✅ MT5 verbunden")
|
||||||
|
print(f" Account: {account_info.login}")
|
||||||
|
print(f" Balance: ${account_info.balance:.2f}")
|
||||||
|
print(f" Equity: ${account_info.equity:.2f}")
|
||||||
|
print(f" Profit: ${account_info.profit:.2f}")
|
||||||
|
|
||||||
|
return True
|
||||||
|
|
||||||
|
def load_json_trades(self, json_pattern="trade_performance_v16_XAUUSD_*.json"):
|
||||||
|
"""Lädt JSON Trade-Daten"""
|
||||||
|
print(f"\n📂 Lade JSON Trade-Daten...")
|
||||||
|
|
||||||
|
json_files = glob.glob(json_pattern)
|
||||||
|
if not json_files:
|
||||||
|
print(f"❌ Keine JSON-Files gefunden")
|
||||||
|
return False
|
||||||
|
|
||||||
|
all_trades = []
|
||||||
|
for file in json_files:
|
||||||
|
try:
|
||||||
|
with open(file, 'r') as f:
|
||||||
|
data = json.load(f)
|
||||||
|
all_trades.extend(data)
|
||||||
|
except Exception as e:
|
||||||
|
print(f"⚠️ Fehler beim Laden von {file}: {e}")
|
||||||
|
|
||||||
|
if not all_trades:
|
||||||
|
return False
|
||||||
|
|
||||||
|
self.json_trades = all_trades
|
||||||
|
print(f"✅ {len(all_trades)} JSON Trades geladen")
|
||||||
|
return True
|
||||||
|
|
||||||
|
def fetch_mt5_history(self, days_back=30):
|
||||||
|
"""Holt Trade-Historie aus MT5"""
|
||||||
|
print(f"\n📊 Hole MT5 Trade-Historie (letzte {days_back} Tage)...")
|
||||||
|
|
||||||
|
# Zeitraum
|
||||||
|
date_to = datetime.now()
|
||||||
|
date_from = date_to - timedelta(days=days_back)
|
||||||
|
|
||||||
|
# Hole ALLE Deals für das Symbol (nicht nur mit Comment)
|
||||||
|
all_deals = mt.history_deals_get(date_from, date_to, symbol=self.symbol)
|
||||||
|
|
||||||
|
if all_deals is None:
|
||||||
|
print(f"❌ Keine Deals gefunden: {mt.last_error()}")
|
||||||
|
return False
|
||||||
|
|
||||||
|
print(f"📊 {len(all_deals)} Total Deals für {self.symbol} gefunden")
|
||||||
|
|
||||||
|
# Filtere nach Strategy
|
||||||
|
strategy_deals = [
|
||||||
|
deal for deal in all_deals
|
||||||
|
if self.strategy_name in deal.comment
|
||||||
|
]
|
||||||
|
|
||||||
|
# Zähle Entry vs Exit Deals
|
||||||
|
entry_deals = [d for d in strategy_deals if d.entry == 0] # IN
|
||||||
|
exit_deals = [d for d in strategy_deals if d.entry == 1] # OUT
|
||||||
|
|
||||||
|
self.mt5_deals = strategy_deals
|
||||||
|
print(f"✅ {len(strategy_deals)} Strategy Deals gefunden:")
|
||||||
|
print(f" - {len(entry_deals)} Entry Deals (entry=0)")
|
||||||
|
print(f" - {len(exit_deals)} Exit Deals (entry=1)")
|
||||||
|
|
||||||
|
# Wenn keine Exit Deals, dann sind Positionen noch offen ODER
|
||||||
|
# sie wurden per SL/TP geschlossen (anderer Comment?)
|
||||||
|
if len(exit_deals) == 0:
|
||||||
|
print(f"\n⚠️ KEINE Exit Deals gefunden!")
|
||||||
|
print(f" Das bedeutet: Positionen wurden per SL/TP geschlossen,")
|
||||||
|
print(f" aber Exit-Deals haben anderen Comment (nicht '{self.strategy_name}')")
|
||||||
|
print(f"\n🔍 Prüfe alle Deals für Position-IDs...")
|
||||||
|
|
||||||
|
# Sammle alle Position IDs aus Entry Deals
|
||||||
|
entry_position_ids = set(d.position_id for d in entry_deals)
|
||||||
|
|
||||||
|
# Suche ALLE Deals mit diesen Position IDs (auch ohne Strategy Comment)
|
||||||
|
all_position_deals = [
|
||||||
|
d for d in all_deals
|
||||||
|
if d.position_id in entry_position_ids
|
||||||
|
]
|
||||||
|
|
||||||
|
print(f"✅ {len(all_position_deals)} Deals für diese Position-IDs gefunden")
|
||||||
|
|
||||||
|
# Verwende ALLE Deals für diese Positionen
|
||||||
|
self.mt5_deals = all_position_deals
|
||||||
|
|
||||||
|
# Neu zählen
|
||||||
|
entry_deals = [d for d in all_position_deals if d.entry == 0]
|
||||||
|
exit_deals = [d for d in all_position_deals if d.entry == 1]
|
||||||
|
print(f" - {len(entry_deals)} Entry Deals")
|
||||||
|
print(f" - {len(exit_deals)} Exit Deals")
|
||||||
|
|
||||||
|
# Hole auch geschlossene Positionen
|
||||||
|
positions_history = mt.history_orders_get(date_from, date_to)
|
||||||
|
|
||||||
|
if positions_history:
|
||||||
|
strategy_positions = [
|
||||||
|
pos for pos in positions_history
|
||||||
|
if pos.symbol == self.symbol and self.strategy_name in pos.comment
|
||||||
|
]
|
||||||
|
self.mt5_positions = strategy_positions
|
||||||
|
print(f"✅ {len(strategy_positions)} Order-Historie-Einträge gefunden")
|
||||||
|
|
||||||
|
return True
|
||||||
|
|
||||||
|
def match_trades(self):
|
||||||
|
"""Matched JSON Entry-Daten mit MT5 Exit-Daten"""
|
||||||
|
print(f"\n🔗 Matche JSON Entries mit MT5 Exits...")
|
||||||
|
|
||||||
|
matched = []
|
||||||
|
unmatched_json = []
|
||||||
|
|
||||||
|
# Gruppiere Deals nach Position ID
|
||||||
|
deals_by_position = defaultdict(list)
|
||||||
|
for deal in self.mt5_deals:
|
||||||
|
deals_by_position[deal.position_id].append(deal)
|
||||||
|
|
||||||
|
# Debug: Zeige erste Deals
|
||||||
|
print(f"\n🔍 Debug: Erste 3 Deals:")
|
||||||
|
for i, deal in enumerate(self.mt5_deals[:3]):
|
||||||
|
print(f" Deal {i+1}:")
|
||||||
|
print(f" ticket: {deal.ticket}")
|
||||||
|
print(f" position_id: {deal.position_id}")
|
||||||
|
print(f" entry: {deal.entry}")
|
||||||
|
print(f" type: {deal.type}")
|
||||||
|
print(f" price: {deal.price}")
|
||||||
|
print(f" profit: {deal.profit}")
|
||||||
|
|
||||||
|
# Extrahiere Deal-IDs aus JSON
|
||||||
|
for json_trade in self.json_trades:
|
||||||
|
order_str = json_trade.get('order_result', '')
|
||||||
|
|
||||||
|
# Extrahiere Deal ID
|
||||||
|
import re
|
||||||
|
deal_match = re.search(r'deal=(\d+)', order_str)
|
||||||
|
|
||||||
|
if not deal_match:
|
||||||
|
unmatched_json.append(json_trade)
|
||||||
|
continue
|
||||||
|
|
||||||
|
entry_deal_id = int(deal_match.group(1))
|
||||||
|
|
||||||
|
# Finde Entry Deal in MT5
|
||||||
|
entry_deal = None
|
||||||
|
for deal in self.mt5_deals:
|
||||||
|
if deal.ticket == entry_deal_id:
|
||||||
|
entry_deal = deal
|
||||||
|
break
|
||||||
|
|
||||||
|
if not entry_deal:
|
||||||
|
unmatched_json.append(json_trade)
|
||||||
|
continue
|
||||||
|
|
||||||
|
# Finde zugehörigen Exit Deal
|
||||||
|
# Ein Exit Deal hat:
|
||||||
|
# - Gleiche position_id
|
||||||
|
# - Andere ticket ID
|
||||||
|
# - entry = 1 (OUT) statt 0 (IN)
|
||||||
|
# - Späterer Zeitstempel
|
||||||
|
position_id = entry_deal.position_id
|
||||||
|
position_deals = deals_by_position[position_id]
|
||||||
|
|
||||||
|
exit_deal = None
|
||||||
|
if len(position_deals) >= 2:
|
||||||
|
# Sortiere nach Zeit
|
||||||
|
sorted_deals = sorted(position_deals, key=lambda d: d.time)
|
||||||
|
# Entry sollte erster sein, Exit zweiter
|
||||||
|
for deal in sorted_deals:
|
||||||
|
if deal.ticket != entry_deal_id and deal.time > entry_deal.time:
|
||||||
|
exit_deal = deal
|
||||||
|
break
|
||||||
|
|
||||||
|
# Erstelle Match-Entry
|
||||||
|
match_entry = {
|
||||||
|
'json_trade': json_trade,
|
||||||
|
'entry_deal': entry_deal,
|
||||||
|
'exit_deal': exit_deal,
|
||||||
|
'is_closed': exit_deal is not None,
|
||||||
|
'entry_time': datetime.fromtimestamp(entry_deal.time),
|
||||||
|
'entry_price': entry_deal.price,
|
||||||
|
'entry_volume': entry_deal.volume,
|
||||||
|
}
|
||||||
|
|
||||||
|
if exit_deal:
|
||||||
|
match_entry.update({
|
||||||
|
'exit_time': datetime.fromtimestamp(exit_deal.time),
|
||||||
|
'exit_price': exit_deal.price,
|
||||||
|
'profit': exit_deal.profit,
|
||||||
|
'commission': exit_deal.commission,
|
||||||
|
'swap': exit_deal.swap,
|
||||||
|
'net_profit': exit_deal.profit + exit_deal.commission + exit_deal.swap,
|
||||||
|
'hold_time_hours': (datetime.fromtimestamp(exit_deal.time) -
|
||||||
|
datetime.fromtimestamp(entry_deal.time)).total_seconds() / 3600,
|
||||||
|
'pips': abs(exit_deal.price - entry_deal.price),
|
||||||
|
'is_winner': exit_deal.profit > 0,
|
||||||
|
})
|
||||||
|
|
||||||
|
matched.append(match_entry)
|
||||||
|
|
||||||
|
self.matched_trades = matched
|
||||||
|
|
||||||
|
print(f"\n✅ {len(matched)} Trades gematched")
|
||||||
|
print(f" - {sum(1 for m in matched if m['is_closed'])} geschlossen")
|
||||||
|
print(f" - {sum(1 for m in matched if not m['is_closed'])} noch offen")
|
||||||
|
|
||||||
|
if unmatched_json:
|
||||||
|
print(f"⚠️ {len(unmatched_json)} JSON Trades konnten nicht gematched werden")
|
||||||
|
|
||||||
|
return True
|
||||||
|
|
||||||
|
def calculate_performance_metrics(self):
|
||||||
|
"""Berechnet umfassende Performance-Metriken"""
|
||||||
|
print(f"\n📈 Berechne Performance-Metriken...")
|
||||||
|
|
||||||
|
closed_trades = [t for t in self.matched_trades if t['is_closed']]
|
||||||
|
|
||||||
|
if not closed_trades:
|
||||||
|
print("⚠️ Keine geschlossenen Trades gefunden!")
|
||||||
|
return False
|
||||||
|
|
||||||
|
# Basic Stats
|
||||||
|
total_closed = len(closed_trades)
|
||||||
|
winners = [t for t in closed_trades if t['is_winner']]
|
||||||
|
losers = [t for t in closed_trades if not t['is_winner']]
|
||||||
|
|
||||||
|
win_count = len(winners)
|
||||||
|
loss_count = len(losers)
|
||||||
|
win_rate = (win_count / total_closed * 100) if total_closed > 0 else 0
|
||||||
|
|
||||||
|
# P&L
|
||||||
|
total_profit = sum(t['profit'] for t in closed_trades)
|
||||||
|
total_commission = sum(t['commission'] for t in closed_trades)
|
||||||
|
total_swap = sum(t['swap'] for t in closed_trades)
|
||||||
|
net_profit = sum(t['net_profit'] for t in closed_trades)
|
||||||
|
|
||||||
|
gross_profit = sum(t['profit'] for t in winners) if winners else 0
|
||||||
|
gross_loss = abs(sum(t['profit'] for t in losers)) if losers else 0
|
||||||
|
|
||||||
|
profit_factor = (gross_profit / gross_loss) if gross_loss > 0 else float('inf')
|
||||||
|
|
||||||
|
# Average Trade
|
||||||
|
avg_win = (sum(t['profit'] for t in winners) / win_count) if winners else 0
|
||||||
|
avg_loss = (sum(t['profit'] for t in losers) / loss_count) if losers else 0
|
||||||
|
avg_trade = net_profit / total_closed
|
||||||
|
|
||||||
|
# Hold Time
|
||||||
|
avg_hold_time = sum(t['hold_time_hours'] for t in closed_trades) / total_closed
|
||||||
|
|
||||||
|
# Expectancy
|
||||||
|
expectancy = (win_rate/100 * avg_win) + ((1 - win_rate/100) * avg_loss)
|
||||||
|
|
||||||
|
# Drawdown Analyse
|
||||||
|
cumulative_profits = []
|
||||||
|
running_profit = 0
|
||||||
|
for trade in sorted(closed_trades, key=lambda x: x['exit_time']):
|
||||||
|
running_profit += trade['net_profit']
|
||||||
|
cumulative_profits.append(running_profit)
|
||||||
|
|
||||||
|
peak = cumulative_profits[0]
|
||||||
|
max_drawdown = 0
|
||||||
|
drawdown_pct = 0
|
||||||
|
|
||||||
|
for profit in cumulative_profits:
|
||||||
|
if profit > peak:
|
||||||
|
peak = profit
|
||||||
|
drawdown = peak - profit
|
||||||
|
if drawdown > max_drawdown:
|
||||||
|
max_drawdown = drawdown
|
||||||
|
drawdown_pct = (drawdown / peak * 100) if peak > 0 else 0
|
||||||
|
|
||||||
|
# Session Analysis
|
||||||
|
session_performance = defaultdict(lambda: {'count': 0, 'profit': 0, 'wins': 0})
|
||||||
|
for trade in closed_trades:
|
||||||
|
session = trade['json_trade'].get('session', 'unknown')
|
||||||
|
session_performance[session]['count'] += 1
|
||||||
|
session_performance[session]['profit'] += trade['net_profit']
|
||||||
|
if trade['is_winner']:
|
||||||
|
session_performance[session]['wins'] += 1
|
||||||
|
|
||||||
|
# Regime Analysis
|
||||||
|
regime_performance = defaultdict(lambda: {'count': 0, 'profit': 0, 'wins': 0})
|
||||||
|
for trade in closed_trades:
|
||||||
|
regime = trade['json_trade'].get('market_regime', 'unknown')
|
||||||
|
regime_performance[regime]['count'] += 1
|
||||||
|
regime_performance[regime]['profit'] += trade['net_profit']
|
||||||
|
if trade['is_winner']:
|
||||||
|
regime_performance[regime]['wins'] += 1
|
||||||
|
|
||||||
|
# Quality Analysis
|
||||||
|
quality_performance = defaultdict(lambda: {'count': 0, 'profit': 0, 'wins': 0})
|
||||||
|
for trade in closed_trades:
|
||||||
|
quality = trade['json_trade'].get('signal_quality', 'unknown')
|
||||||
|
quality_performance[quality]['count'] += 1
|
||||||
|
quality_performance[quality]['profit'] += trade['net_profit']
|
||||||
|
if trade['is_winner']:
|
||||||
|
quality_performance[quality]['wins'] += 1
|
||||||
|
|
||||||
|
# Best/Worst Trades
|
||||||
|
best_trade = max(closed_trades, key=lambda x: x['profit'])
|
||||||
|
worst_trade = min(closed_trades, key=lambda x: x['profit'])
|
||||||
|
|
||||||
|
self.stats = {
|
||||||
|
'total_closed': total_closed,
|
||||||
|
'win_count': win_count,
|
||||||
|
'loss_count': loss_count,
|
||||||
|
'win_rate': win_rate,
|
||||||
|
'total_profit': total_profit,
|
||||||
|
'total_commission': total_commission,
|
||||||
|
'total_swap': total_swap,
|
||||||
|
'net_profit': net_profit,
|
||||||
|
'gross_profit': gross_profit,
|
||||||
|
'gross_loss': gross_loss,
|
||||||
|
'profit_factor': profit_factor,
|
||||||
|
'avg_win': avg_win,
|
||||||
|
'avg_loss': avg_loss,
|
||||||
|
'avg_trade': avg_trade,
|
||||||
|
'avg_hold_time': avg_hold_time,
|
||||||
|
'expectancy': expectancy,
|
||||||
|
'max_drawdown': max_drawdown,
|
||||||
|
'max_drawdown_pct': drawdown_pct,
|
||||||
|
'session_performance': dict(session_performance),
|
||||||
|
'regime_performance': dict(regime_performance),
|
||||||
|
'quality_performance': dict(quality_performance),
|
||||||
|
'best_trade': {
|
||||||
|
'profit': best_trade['profit'],
|
||||||
|
'entry_time': best_trade['entry_time'],
|
||||||
|
'session': best_trade['json_trade'].get('session'),
|
||||||
|
},
|
||||||
|
'worst_trade': {
|
||||||
|
'profit': worst_trade['profit'],
|
||||||
|
'entry_time': worst_trade['entry_time'],
|
||||||
|
'session': worst_trade['json_trade'].get('session'),
|
||||||
|
},
|
||||||
|
'cumulative_profits': cumulative_profits,
|
||||||
|
}
|
||||||
|
|
||||||
|
print("✅ Performance-Metriken berechnet")
|
||||||
|
return True
|
||||||
|
|
||||||
|
def print_profitability_report(self):
|
||||||
|
"""Druckt umfassenden Profitabilitäts-Report"""
|
||||||
|
stats = self.stats
|
||||||
|
|
||||||
|
print("\n" + "="*70)
|
||||||
|
print("💰 TRADINGBOT V1.6 - PROFITABILITY REPORT")
|
||||||
|
print("="*70)
|
||||||
|
|
||||||
|
# Profitability Status
|
||||||
|
is_profitable = stats['net_profit'] > 0
|
||||||
|
status_emoji = "✅" if is_profitable else "❌"
|
||||||
|
status_text = "PROFITABEL" if is_profitable else "NICHT PROFITABEL"
|
||||||
|
|
||||||
|
print(f"\n{status_emoji} STATUS: {status_text}")
|
||||||
|
print(f" Net Profit: ${stats['net_profit']:.2f}")
|
||||||
|
|
||||||
|
print(f"\n📊 TRADE STATISTICS:")
|
||||||
|
print(f" Total Closed Trades: {stats['total_closed']}")
|
||||||
|
print(f" Winners: {stats['win_count']} ({stats['win_rate']:.1f}%)")
|
||||||
|
print(f" Losers: {stats['loss_count']} ({100-stats['win_rate']:.1f}%)")
|
||||||
|
|
||||||
|
print(f"\n💵 PROFIT & LOSS:")
|
||||||
|
print(f" Gross Profit: ${stats['gross_profit']:.2f}")
|
||||||
|
print(f" Gross Loss: ${stats['gross_loss']:.2f}")
|
||||||
|
print(f" Total Commission: ${stats['total_commission']:.2f}")
|
||||||
|
print(f" Total Swap: ${stats['total_swap']:.2f}")
|
||||||
|
print(f" Net Profit: ${stats['net_profit']:.2f}")
|
||||||
|
|
||||||
|
print(f"\n📈 PERFORMANCE METRICS:")
|
||||||
|
pf_display = f"{stats['profit_factor']:.2f}" if stats['profit_factor'] != float('inf') else "∞"
|
||||||
|
print(f" Profit Factor: {pf_display}")
|
||||||
|
print(f" Average Win: ${stats['avg_win']:.2f}")
|
||||||
|
print(f" Average Loss: ${stats['avg_loss']:.2f}")
|
||||||
|
print(f" Average Trade: ${stats['avg_trade']:.2f}")
|
||||||
|
print(f" Expectancy: ${stats['expectancy']:.2f}")
|
||||||
|
|
||||||
|
print(f"\n⏱️ TIMING:")
|
||||||
|
print(f" Avg Hold Time: {stats['avg_hold_time']:.1f} hours")
|
||||||
|
|
||||||
|
print(f"\n📉 RISK METRICS:")
|
||||||
|
print(f" Max Drawdown: ${stats['max_drawdown']:.2f} ({stats['max_drawdown_pct']:.1f}%)")
|
||||||
|
|
||||||
|
print(f"\n🏆 BEST TRADE:")
|
||||||
|
best = stats['best_trade']
|
||||||
|
print(f" Profit: ${best['profit']:.2f}")
|
||||||
|
print(f" Time: {best['entry_time'].strftime('%Y-%m-%d %H:%M')}")
|
||||||
|
print(f" Session: {best['session']}")
|
||||||
|
|
||||||
|
print(f"\n💔 WORST TRADE:")
|
||||||
|
worst = stats['worst_trade']
|
||||||
|
print(f" Loss: ${worst['profit']:.2f}")
|
||||||
|
print(f" Time: {worst['entry_time'].strftime('%Y-%m-%d %H:%M')}")
|
||||||
|
print(f" Session: {worst['session']}")
|
||||||
|
|
||||||
|
print(f"\n🌍 SESSION PERFORMANCE:")
|
||||||
|
for session in ['asian', 'london', 'overlap', 'ny']:
|
||||||
|
if session in stats['session_performance']:
|
||||||
|
perf = stats['session_performance'][session]
|
||||||
|
win_rate = (perf['wins'] / perf['count'] * 100) if perf['count'] > 0 else 0
|
||||||
|
profit_emoji = "✅" if perf['profit'] > 0 else "❌"
|
||||||
|
print(f" {session.capitalize():8s}: {perf['count']:3d} trades | "
|
||||||
|
f"${perf['profit']:7.2f} | Win Rate: {win_rate:5.1f}% {profit_emoji}")
|
||||||
|
|
||||||
|
print(f"\n📈 REGIME PERFORMANCE:")
|
||||||
|
for regime, perf in stats['regime_performance'].items():
|
||||||
|
win_rate = (perf['wins'] / perf['count'] * 100) if perf['count'] > 0 else 0
|
||||||
|
profit_emoji = "✅" if perf['profit'] > 0 else "❌"
|
||||||
|
print(f" {regime.capitalize():10s}: {perf['count']:3d} trades | "
|
||||||
|
f"${perf['profit']:7.2f} | Win Rate: {win_rate:5.1f}% {profit_emoji}")
|
||||||
|
|
||||||
|
print(f"\n🎯 SIGNAL QUALITY PERFORMANCE:")
|
||||||
|
for quality in ['excellent', 'good', 'fair']:
|
||||||
|
if quality in stats['quality_performance']:
|
||||||
|
perf = stats['quality_performance'][quality]
|
||||||
|
win_rate = (perf['wins'] / perf['count'] * 100) if perf['count'] > 0 else 0
|
||||||
|
profit_emoji = "✅" if perf['profit'] > 0 else "❌"
|
||||||
|
print(f" {quality.capitalize():10s}: {perf['count']:3d} trades | "
|
||||||
|
f"${perf['profit']:7.2f} | Win Rate: {win_rate:5.1f}% {profit_emoji}")
|
||||||
|
|
||||||
|
print("\n" + "="*70)
|
||||||
|
|
||||||
|
# Interpretation
|
||||||
|
print("\n💡 INTERPRETATION:")
|
||||||
|
|
||||||
|
if is_profitable:
|
||||||
|
print(" ✅ Die Strategie ist profitabel!")
|
||||||
|
if stats['win_rate'] >= 50:
|
||||||
|
print(" ✅ Gute Win-Rate")
|
||||||
|
else:
|
||||||
|
print(" ⚠️ Win-Rate unter 50% - Strategie profitiert von großen Wins")
|
||||||
|
|
||||||
|
if stats['profit_factor'] >= 2.0:
|
||||||
|
print(" ✅ Exzellenter Profit Factor (>=2.0)")
|
||||||
|
elif stats['profit_factor'] >= 1.5:
|
||||||
|
print(" ✅ Guter Profit Factor (>=1.5)")
|
||||||
|
else:
|
||||||
|
print(" ⚠️ Profit Factor könnte besser sein")
|
||||||
|
else:
|
||||||
|
print(" ❌ Die Strategie ist derzeit nicht profitabel")
|
||||||
|
print(" ⚠️ Optimierung notwendig!")
|
||||||
|
|
||||||
|
print("="*70)
|
||||||
|
|
||||||
|
def save_results(self, output_file='profitability_analysis.json'):
|
||||||
|
"""Speichert Ergebnisse als JSON"""
|
||||||
|
print(f"\n💾 Speichere Ergebnisse...")
|
||||||
|
|
||||||
|
results = {
|
||||||
|
'analysis_date': datetime.now().isoformat(),
|
||||||
|
'strategy_name': self.strategy_name,
|
||||||
|
'symbol': self.symbol,
|
||||||
|
'statistics': {
|
||||||
|
k: v for k, v in self.stats.items()
|
||||||
|
if k not in ['best_trade', 'worst_trade', 'cumulative_profits']
|
||||||
|
},
|
||||||
|
'best_trade': {
|
||||||
|
'profit': self.stats['best_trade']['profit'],
|
||||||
|
'entry_time': self.stats['best_trade']['entry_time'].isoformat(),
|
||||||
|
'session': self.stats['best_trade']['session'],
|
||||||
|
},
|
||||||
|
'worst_trade': {
|
||||||
|
'profit': self.stats['worst_trade']['profit'],
|
||||||
|
'entry_time': self.stats['worst_trade']['entry_time'].isoformat(),
|
||||||
|
'session': self.stats['worst_trade']['session'],
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
with open(output_file, 'w') as f:
|
||||||
|
json.dump(results, f, indent=2)
|
||||||
|
|
||||||
|
print(f"✅ Ergebnisse gespeichert: {output_file}")
|
||||||
|
|
||||||
|
def disconnect_mt5(self):
|
||||||
|
"""Trennt MT5 Verbindung"""
|
||||||
|
mt.shutdown()
|
||||||
|
print("✅ MT5 Verbindung getrennt")
|
||||||
|
|
||||||
|
|
||||||
|
def main():
|
||||||
|
"""Haupt-Analyse"""
|
||||||
|
print("="*70)
|
||||||
|
print("💰 TradingBot V1.6 - MT5 Profitability Analyzer")
|
||||||
|
print("="*70)
|
||||||
|
|
||||||
|
analyzer = MT5ProfitabilityAnalyzer()
|
||||||
|
|
||||||
|
# 1. Connect MT5
|
||||||
|
if not analyzer.connect_mt5():
|
||||||
|
return
|
||||||
|
|
||||||
|
# 2. Load JSON Trades
|
||||||
|
if not analyzer.load_json_trades():
|
||||||
|
analyzer.disconnect_mt5()
|
||||||
|
return
|
||||||
|
|
||||||
|
# 3. Fetch MT5 History
|
||||||
|
if not analyzer.fetch_mt5_history(days_back=30):
|
||||||
|
analyzer.disconnect_mt5()
|
||||||
|
return
|
||||||
|
|
||||||
|
# 4. Match Trades
|
||||||
|
if not analyzer.match_trades():
|
||||||
|
analyzer.disconnect_mt5()
|
||||||
|
return
|
||||||
|
|
||||||
|
# 5. Calculate Performance
|
||||||
|
if not analyzer.calculate_performance_metrics():
|
||||||
|
analyzer.disconnect_mt5()
|
||||||
|
return
|
||||||
|
|
||||||
|
# 6. Print Report
|
||||||
|
analyzer.print_profitability_report()
|
||||||
|
|
||||||
|
# 7. Save Results
|
||||||
|
analyzer.save_results()
|
||||||
|
|
||||||
|
# 8. Disconnect
|
||||||
|
analyzer.disconnect_mt5()
|
||||||
|
|
||||||
|
print("\n" + "="*70)
|
||||||
|
print("✅ ANALYSE ABGESCHLOSSEN")
|
||||||
|
print("="*70)
|
||||||
|
print("\n📂 Generierte Files:")
|
||||||
|
print(" - profitability_analysis.json")
|
||||||
|
print("\n🎯 Nächste Schritte basierend auf Ergebnis:")
|
||||||
|
print(" • Falls profitabel → SQLite + Telegram + Scaling")
|
||||||
|
print(" • Falls nicht profitabel → Parameter-Optimierung + Backtesting")
|
||||||
|
print("="*70)
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
main()
|
||||||
@@ -0,0 +1,623 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"timestamp": "2025-12-01T09:30:01.179022",
|
||||||
|
"version": "V1.6_Adaptive_Complete",
|
||||||
|
"symbol": "XAUUSD",
|
||||||
|
"entry_signal": 1,
|
||||||
|
"confidence": 100.0,
|
||||||
|
"adaptive_threshold": 70,
|
||||||
|
"signal_quality": "excellent",
|
||||||
|
"market_regime": "ranging",
|
||||||
|
"regime_strength": 26.187311170434114,
|
||||||
|
"risk_adjusted_strength": 176397.25501302085,
|
||||||
|
"adaptive_interval": 5,
|
||||||
|
"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=503373712, order=555239668, volume=0.1, price=4249.84, bid=0.0, ask=0.0, comment='Request executed', request_id=2553087505, retcode_external=0, request=TradeRequest(action=1, magic=234000, order=0, symbol='XAUUSD', volume=0.1, price=4249.87, stoplimit=0.0, sl=4244.47261369406, tp=4262.69846576485, deviation=20, type=0, type_filling=1, type_time=0, expiration=0, comment='TradingBot_V1.6', position=0, position_by=0))"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"timestamp": "2025-12-01T09:40:01.091136",
|
||||||
|
"version": "V1.6_Adaptive_Complete",
|
||||||
|
"symbol": "XAUUSD",
|
||||||
|
"entry_signal": 1,
|
||||||
|
"confidence": 100.0,
|
||||||
|
"adaptive_threshold": 70,
|
||||||
|
"signal_quality": "excellent",
|
||||||
|
"market_regime": "ranging",
|
||||||
|
"regime_strength": 26.187311170434114,
|
||||||
|
"risk_adjusted_strength": 176705.93331163903,
|
||||||
|
"adaptive_interval": 5,
|
||||||
|
"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=503404159, order=555271485, volume=0.1, price=4244.93, bid=0.0, ask=0.0, comment='Request executed', request_id=2553087506, retcode_external=0, request=TradeRequest(action=1, magic=234000, order=0, symbol='XAUUSD', volume=0.1, price=4244.86, stoplimit=0.0, sl=4239.496226500302, tp=4257.849433749243, deviation=20, type=0, type_filling=1, type_time=0, expiration=0, comment='TradingBot_V1.6', position=0, position_by=0))"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"timestamp": "2025-12-01T09:50:01.237961",
|
||||||
|
"version": "V1.6_Adaptive_Complete",
|
||||||
|
"symbol": "XAUUSD",
|
||||||
|
"entry_signal": 1,
|
||||||
|
"confidence": 100.0,
|
||||||
|
"adaptive_threshold": 70,
|
||||||
|
"signal_quality": "excellent",
|
||||||
|
"market_regime": "ranging",
|
||||||
|
"regime_strength": 26.187311170434114,
|
||||||
|
"risk_adjusted_strength": 174783.75079423017,
|
||||||
|
"adaptive_interval": 5,
|
||||||
|
"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=503430133, order=555298988, volume=0.1, price=4240.11, bid=0.0, ask=0.0, comment='Request executed', request_id=2553087507, retcode_external=0, request=TradeRequest(action=1, magic=234000, order=0, symbol='XAUUSD', volume=0.1, price=4240.11, stoplimit=0.0, sl=4234.551737412074, tp=4253.340656469817, deviation=20, type=0, type_filling=1, type_time=0, expiration=0, comment='TradingBot_V1.6', position=0, position_by=0))"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"timestamp": "2025-12-01T11:15:00.937882",
|
||||||
|
"version": "V1.6_Adaptive_Complete",
|
||||||
|
"symbol": "XAUUSD",
|
||||||
|
"entry_signal": 1,
|
||||||
|
"confidence": 100.0,
|
||||||
|
"adaptive_threshold": 70,
|
||||||
|
"signal_quality": "excellent",
|
||||||
|
"market_regime": "ranging",
|
||||||
|
"regime_strength": 22.950196356222577,
|
||||||
|
"risk_adjusted_strength": 185090.22489130433,
|
||||||
|
"adaptive_interval": 5,
|
||||||
|
"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=503609381, order=555485214, volume=0.1, price=4259.0, bid=0.0, ask=0.0, comment='Request executed', request_id=2553087508, retcode_external=0, request=TradeRequest(action=1, magic=234000, order=0, symbol='XAUUSD', volume=0.1, price=4259.0, stoplimit=0.0, sl=4253.756304214274, tp=4271.4442394643165, deviation=20, type=0, type_filling=1, type_time=0, expiration=0, comment='TradingBot_V1.6', position=0, position_by=0))"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"timestamp": "2025-12-01T11:25:00.836591",
|
||||||
|
"version": "V1.6_Adaptive_Complete",
|
||||||
|
"symbol": "XAUUSD",
|
||||||
|
"entry_signal": 1,
|
||||||
|
"confidence": 100.0,
|
||||||
|
"adaptive_threshold": 70,
|
||||||
|
"signal_quality": "excellent",
|
||||||
|
"market_regime": "ranging",
|
||||||
|
"regime_strength": 22.950196356222577,
|
||||||
|
"risk_adjusted_strength": 182442.8148539039,
|
||||||
|
"adaptive_interval": 5,
|
||||||
|
"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=503632416, order=555509528, volume=0.1, price=4254.89, bid=0.0, ask=0.0, comment='Request executed', request_id=2553087509, retcode_external=0, request=TradeRequest(action=1, magic=234000, order=0, symbol='XAUUSD', volume=0.1, price=4254.83, stoplimit=0.0, sl=4249.562827807786, tp=4267.3679304805355, deviation=20, type=0, type_filling=1, type_time=0, expiration=0, comment='TradingBot_V1.6', position=0, position_by=0))"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"timestamp": "2025-12-01T12:30:01.054444",
|
||||||
|
"version": "V1.6_Adaptive_Complete",
|
||||||
|
"symbol": "XAUUSD",
|
||||||
|
"entry_signal": 1,
|
||||||
|
"confidence": 100.0,
|
||||||
|
"adaptive_threshold": 70,
|
||||||
|
"signal_quality": "excellent",
|
||||||
|
"market_regime": "ranging",
|
||||||
|
"regime_strength": 22.950196356222577,
|
||||||
|
"risk_adjusted_strength": 197309.6636831888,
|
||||||
|
"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=503759064, order=555646332, volume=0.1, price=4254.58, bid=0.0, ask=0.0, comment='Request executed', request_id=2553087510, retcode_external=0, request=TradeRequest(action=1, magic=234000, order=0, symbol='XAUUSD', volume=0.1, price=4254.6, stoplimit=0.0, sl=4249.845641441868, tp=4265.925896395328, deviation=20, type=0, type_filling=1, type_time=0, expiration=0, comment='TradingBot_V1.6', position=0, position_by=0))"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"timestamp": "2025-12-01T13:15:01.501352",
|
||||||
|
"version": "V1.6_Adaptive_Complete",
|
||||||
|
"symbol": "XAUUSD",
|
||||||
|
"entry_signal": 1,
|
||||||
|
"confidence": 100.0,
|
||||||
|
"adaptive_threshold": 70,
|
||||||
|
"signal_quality": "excellent",
|
||||||
|
"market_regime": "ranging",
|
||||||
|
"regime_strength": 22.950196356222577,
|
||||||
|
"risk_adjusted_strength": 196985.01079364016,
|
||||||
|
"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=503855999, order=555749313, volume=0.1, price=4249.08, bid=0.0, ask=0.0, comment='Request executed', request_id=2553087511, retcode_external=0, request=TradeRequest(action=1, magic=234000, order=0, symbol='XAUUSD', volume=0.1, price=4249.07, stoplimit=0.0, sl=4244.391994744853, tp=4260.100013137867, deviation=20, type=0, type_filling=1, type_time=0, expiration=0, comment='TradingBot_V1.6', position=0, position_by=0))"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"timestamp": "2025-12-01T14:00:01.300231",
|
||||||
|
"version": "V1.6_Adaptive_Complete",
|
||||||
|
"symbol": "XAUUSD",
|
||||||
|
"entry_signal": 1,
|
||||||
|
"confidence": 100.0,
|
||||||
|
"adaptive_threshold": 70,
|
||||||
|
"signal_quality": "excellent",
|
||||||
|
"market_regime": "ranging",
|
||||||
|
"regime_strength": 22.950196356222577,
|
||||||
|
"risk_adjusted_strength": 200635.71763647176,
|
||||||
|
"adaptive_interval": 15,
|
||||||
|
"session": "overlap",
|
||||||
|
"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=503984299, order=555882788, volume=0.1, price=4246.69, bid=0.0, ask=0.0, comment='Request executed', request_id=2553087512, retcode_external=0, request=TradeRequest(action=1, magic=234000, order=0, symbol='XAUUSD', volume=0.1, price=4246.7, stoplimit=0.0, sl=4241.557051440018, tp=4258.927371399957, deviation=20, type=0, type_filling=1, type_time=0, expiration=0, comment='TradingBot_V1.6', position=0, position_by=0))"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"timestamp": "2025-12-01T14:45:01.547899",
|
||||||
|
"version": "V1.6_Adaptive_Complete",
|
||||||
|
"symbol": "XAUUSD",
|
||||||
|
"entry_signal": 1,
|
||||||
|
"confidence": 100.0,
|
||||||
|
"adaptive_threshold": 70,
|
||||||
|
"signal_quality": "excellent",
|
||||||
|
"market_regime": "ranging",
|
||||||
|
"regime_strength": 22.855971047619605,
|
||||||
|
"risk_adjusted_strength": 191017.6319337731,
|
||||||
|
"adaptive_interval": 15,
|
||||||
|
"session": "overlap",
|
||||||
|
"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=504129495, order=556035267, volume=0.1, price=4262.15, bid=0.0, ask=0.0, comment='Request executed', request_id=2553087513, retcode_external=0, request=TradeRequest(action=1, magic=234000, order=0, symbol='XAUUSD', volume=0.1, price=4262.24, stoplimit=0.0, sl=4256.6815248643825, tp=4275.4711878390435, deviation=20, type=0, type_filling=1, type_time=0, expiration=0, comment='TradingBot_V1.6', position=0, position_by=0))"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"timestamp": "2025-12-01T15:00:07.840065",
|
||||||
|
"version": "V1.6_Adaptive_Complete",
|
||||||
|
"symbol": "XAUUSD",
|
||||||
|
"entry_signal": 1,
|
||||||
|
"confidence": 100.0,
|
||||||
|
"adaptive_threshold": 70,
|
||||||
|
"signal_quality": "excellent",
|
||||||
|
"market_regime": "ranging",
|
||||||
|
"regime_strength": 22.855971047619605,
|
||||||
|
"risk_adjusted_strength": 180240.67670192872,
|
||||||
|
"adaptive_interval": 15,
|
||||||
|
"session": "overlap",
|
||||||
|
"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=504179076, order=556087481, volume=0.1, price=4247.86, bid=0.0, ask=0.0, comment='Request executed', request_id=2553087514, retcode_external=0, request=TradeRequest(action=1, magic=234000, order=0, symbol='XAUUSD', volume=0.1, price=4247.59, stoplimit=0.0, sl=4240.9611044446665, tp=4263.497238888332, deviation=20, type=0, type_filling=1, type_time=0, expiration=0, comment='TradingBot_V1.6', position=0, position_by=0))"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"timestamp": "2025-12-01T15:30:23.337699",
|
||||||
|
"version": "V1.6_Adaptive_Complete",
|
||||||
|
"symbol": "XAUUSD",
|
||||||
|
"entry_signal": 1,
|
||||||
|
"confidence": 100.0,
|
||||||
|
"adaptive_threshold": 70,
|
||||||
|
"signal_quality": "excellent",
|
||||||
|
"market_regime": "ranging",
|
||||||
|
"regime_strength": 19.893595925527748,
|
||||||
|
"risk_adjusted_strength": 188782.93793608592,
|
||||||
|
"adaptive_interval": 15,
|
||||||
|
"session": "overlap",
|
||||||
|
"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=504270600, order=556183948, volume=0.1, price=4246.72, bid=0.0, ask=0.0, comment='Request executed', request_id=2553087515, retcode_external=0, request=TradeRequest(action=1, magic=234000, order=0, symbol='XAUUSD', volume=0.1, price=4246.79, stoplimit=0.0, sl=4240.418990879546, tp=4262.052522801137, deviation=20, type=0, type_filling=1, type_time=0, expiration=0, comment='TradingBot_V1.6', position=0, position_by=0))"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"timestamp": "2025-12-01T15:40:12.627862",
|
||||||
|
"version": "V1.6_Adaptive_Complete",
|
||||||
|
"symbol": "XAUUSD",
|
||||||
|
"entry_signal": 1,
|
||||||
|
"confidence": 100.0,
|
||||||
|
"adaptive_threshold": 70,
|
||||||
|
"signal_quality": "excellent",
|
||||||
|
"market_regime": "ranging",
|
||||||
|
"regime_strength": 22.011906057750465,
|
||||||
|
"risk_adjusted_strength": 171292.01007691692,
|
||||||
|
"adaptive_interval": 5,
|
||||||
|
"session": "overlap",
|
||||||
|
"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=504333873, order=556248758, volume=0.09, price=4232.56, bid=0.0, ask=0.0, comment='Request executed', request_id=2553087516, retcode_external=0, request=TradeRequest(action=1, magic=234000, order=0, symbol='XAUUSD', volume=0.09, price=4231.75, stoplimit=0.0, sl=4224.03960280412, tp=4250.3959929897, deviation=20, type=0, type_filling=1, type_time=0, expiration=0, comment='TradingBot_V1.6', position=0, position_by=0))"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"timestamp": "2025-12-01T15:45:01.924286",
|
||||||
|
"version": "V1.6_Adaptive_Complete",
|
||||||
|
"symbol": "XAUUSD",
|
||||||
|
"entry_signal": 1,
|
||||||
|
"confidence": 100.0,
|
||||||
|
"adaptive_threshold": 70,
|
||||||
|
"signal_quality": "excellent",
|
||||||
|
"market_regime": "ranging",
|
||||||
|
"regime_strength": 22.96919510043668,
|
||||||
|
"risk_adjusted_strength": 165496.095712373,
|
||||||
|
"adaptive_interval": 5,
|
||||||
|
"session": "overlap",
|
||||||
|
"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=504368039, order=556284215, volume=0.08, price=4224.5, bid=0.0, ask=0.0, comment='Request executed', request_id=2553087517, retcode_external=0, request=TradeRequest(action=1, magic=234000, order=0, symbol='XAUUSD', volume=0.08, price=4225.38, stoplimit=0.0, sl=4216.36685280412, tp=4247.2828679897, deviation=20, type=0, type_filling=1, type_time=0, expiration=0, comment='TradingBot_V1.6', position=0, position_by=0))"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"timestamp": "2025-12-02T17:00:03.945254",
|
||||||
|
"version": "V1.6_Adaptive_Complete",
|
||||||
|
"symbol": "XAUUSD",
|
||||||
|
"entry_signal": 1,
|
||||||
|
"confidence": 91.89,
|
||||||
|
"adaptive_threshold": 70,
|
||||||
|
"signal_quality": "excellent",
|
||||||
|
"market_regime": "ranging",
|
||||||
|
"regime_strength": 32.00907405127121,
|
||||||
|
"risk_adjusted_strength": 102422.27759198961,
|
||||||
|
"adaptive_interval": 5,
|
||||||
|
"session": "ny",
|
||||||
|
"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=508082993, order=560205332, volume=0.07, price=4169.37, bid=0.0, ask=0.0, comment='Request executed', request_id=2553087518, retcode_external=0, request=TradeRequest(action=1, magic=234000, order=0, symbol='XAUUSD', volume=0.07, price=4169.33, stoplimit=0.0, sl=4159.667887312871, tp=4193.275281717823, deviation=20, type=0, type_filling=1, type_time=0, expiration=0, comment='TradingBot_V1.6', position=0, position_by=0))"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"timestamp": "2025-12-02T18:35:01.428979",
|
||||||
|
"version": "V1.6_Adaptive_Complete",
|
||||||
|
"symbol": "XAUUSD",
|
||||||
|
"entry_signal": 1,
|
||||||
|
"confidence": 89.28,
|
||||||
|
"adaptive_threshold": 70,
|
||||||
|
"signal_quality": "excellent",
|
||||||
|
"market_regime": "ranging",
|
||||||
|
"regime_strength": 32.00907405127121,
|
||||||
|
"risk_adjusted_strength": 94959.99219814289,
|
||||||
|
"adaptive_interval": 5,
|
||||||
|
"session": "ny",
|
||||||
|
"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=508370745, order=560529506, volume=0.1, price=4194.04, bid=0.0, ask=0.0, comment='Request executed', request_id=2553087519, retcode_external=0, request=TradeRequest(action=1, magic=234000, order=0, symbol='XAUUSD', volume=0.1, price=4194.08, stoplimit=0.0, sl=4187.015967471403, tp=4211.075081321494, deviation=20, type=0, type_filling=1, type_time=0, expiration=0, comment='TradingBot_V1.6', position=0, position_by=0))"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"timestamp": "2025-12-02T19:40:01.665835",
|
||||||
|
"version": "V1.6_Adaptive_Complete",
|
||||||
|
"symbol": "XAUUSD",
|
||||||
|
"entry_signal": 1,
|
||||||
|
"confidence": 88.43,
|
||||||
|
"adaptive_threshold": 70,
|
||||||
|
"signal_quality": "excellent",
|
||||||
|
"market_regime": "ranging",
|
||||||
|
"regime_strength": 34.84893980267297,
|
||||||
|
"risk_adjusted_strength": 93505.30823592909,
|
||||||
|
"adaptive_interval": 5,
|
||||||
|
"session": "ny",
|
||||||
|
"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=508506612, order=560690972, volume=0.1, price=4186.98, bid=0.0, ask=0.0, comment='Request executed', request_id=2553087520, retcode_external=0, request=TradeRequest(action=1, magic=234000, order=0, symbol='XAUUSD', volume=0.1, price=4187.05, stoplimit=0.0, sl=4181.44009902176, tp=4200.444752445599, deviation=20, type=0, type_filling=1, type_time=0, expiration=0, comment='TradingBot_V1.6', position=0, position_by=0))"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"timestamp": "2025-12-02T21:00:01.869508",
|
||||||
|
"version": "V1.6_Adaptive_Complete",
|
||||||
|
"symbol": "XAUUSD",
|
||||||
|
"entry_signal": 1,
|
||||||
|
"confidence": 87.16,
|
||||||
|
"adaptive_threshold": 70,
|
||||||
|
"signal_quality": "excellent",
|
||||||
|
"market_regime": "ranging",
|
||||||
|
"regime_strength": 34.84893980267297,
|
||||||
|
"risk_adjusted_strength": 94595.20323478205,
|
||||||
|
"adaptive_interval": 5,
|
||||||
|
"session": "ny",
|
||||||
|
"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=508639732, order=560845433, volume=0.1, price=4196.88, bid=0.0, ask=0.0, comment='Request executed', request_id=2553087521, retcode_external=0, request=TradeRequest(action=1, magic=234000, order=0, symbol='XAUUSD', volume=0.1, price=4196.75, stoplimit=0.0, sl=4192.121468613154, tp=4207.656328467115, deviation=20, type=0, type_filling=1, type_time=0, expiration=0, comment='TradingBot_V1.6', position=0, position_by=0))"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"timestamp": "2025-12-02T21:45:02.626320",
|
||||||
|
"version": "V1.6_Adaptive_Complete",
|
||||||
|
"symbol": "XAUUSD",
|
||||||
|
"entry_signal": 1,
|
||||||
|
"confidence": 88.76,
|
||||||
|
"adaptive_threshold": 70,
|
||||||
|
"signal_quality": "excellent",
|
||||||
|
"market_regime": "ranging",
|
||||||
|
"regime_strength": 34.84893980267297,
|
||||||
|
"risk_adjusted_strength": 92306.78311213526,
|
||||||
|
"adaptive_interval": 5,
|
||||||
|
"session": "ny",
|
||||||
|
"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=508712897, order=560928109, volume=0.1, price=4210.45, bid=0.0, ask=0.0, comment='Request executed', request_id=2553087523, retcode_external=0, request=TradeRequest(action=1, magic=234000, order=0, symbol='XAUUSD', volume=0.1, price=4210.05, stoplimit=0.0, sl=4204.944212121386, tp=4222.149469696533, deviation=20, type=0, type_filling=1, type_time=0, expiration=0, comment='TradingBot_V1.6', position=0, position_by=0))"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"timestamp": "2025-12-03T17:00:06.841820",
|
||||||
|
"version": "V1.6_Adaptive_Complete",
|
||||||
|
"symbol": "XAUUSD",
|
||||||
|
"entry_signal": 1,
|
||||||
|
"confidence": 99.01,
|
||||||
|
"adaptive_threshold": 70,
|
||||||
|
"signal_quality": "excellent",
|
||||||
|
"market_regime": "ranging",
|
||||||
|
"regime_strength": 46.940390834700004,
|
||||||
|
"risk_adjusted_strength": 83670.70705993928,
|
||||||
|
"adaptive_interval": 15,
|
||||||
|
"session": "ny",
|
||||||
|
"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=511510378, order=563962292, volume=0.09, price=4215.46, bid=0.0, ask=0.0, comment='Request executed', request_id=2553087524, retcode_external=0, request=TradeRequest(action=1, magic=234000, order=0, symbol='XAUUSD', volume=0.09, price=4216.47, stoplimit=0.0, sl=4207.920880005341, tp=4237.212799986648, deviation=20, type=0, type_filling=1, type_time=0, expiration=0, comment='TradingBot_V1.6', position=0, position_by=0))"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"timestamp": "2025-12-03T17:55:15.633690",
|
||||||
|
"version": "V1.6_Adaptive_Complete",
|
||||||
|
"symbol": "XAUUSD",
|
||||||
|
"entry_signal": 1,
|
||||||
|
"confidence": 98.91,
|
||||||
|
"adaptive_threshold": 70,
|
||||||
|
"signal_quality": "excellent",
|
||||||
|
"market_regime": "ranging",
|
||||||
|
"regime_strength": 46.940390834700004,
|
||||||
|
"risk_adjusted_strength": 83244.24420344245,
|
||||||
|
"adaptive_interval": 5,
|
||||||
|
"session": "ny",
|
||||||
|
"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=511699655, order=564160610, volume=0.09, price=4206.76, bid=0.0, ask=0.0, comment='Request executed', request_id=2553087525, retcode_external=0, request=TradeRequest(action=1, magic=234000, order=0, symbol='XAUUSD', volume=0.09, price=4207.04, stoplimit=0.0, sl=4198.631041471649, tp=4227.222396320878, deviation=20, type=0, type_filling=1, type_time=0, expiration=0, comment='TradingBot_V1.6', position=0, position_by=0))"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"timestamp": "2025-12-03T18:00:01.999827",
|
||||||
|
"version": "V1.6_Adaptive_Complete",
|
||||||
|
"symbol": "XAUUSD",
|
||||||
|
"entry_signal": 1,
|
||||||
|
"confidence": 98.93,
|
||||||
|
"adaptive_threshold": 70,
|
||||||
|
"signal_quality": "excellent",
|
||||||
|
"market_regime": "ranging",
|
||||||
|
"regime_strength": 46.940390834700004,
|
||||||
|
"risk_adjusted_strength": 81264.39403518823,
|
||||||
|
"adaptive_interval": 5,
|
||||||
|
"session": "ny",
|
||||||
|
"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=511734010, order=564196164, volume=0.08, price=4201.04, bid=0.0, ask=0.0, comment='Request executed', request_id=2553087526, retcode_external=0, request=TradeRequest(action=1, magic=234000, order=0, symbol='XAUUSD', volume=0.08, price=4200.96, stoplimit=0.0, sl=4192.116105763751, tp=4222.404735590624, deviation=20, type=0, type_filling=1, type_time=0, expiration=0, comment='TradingBot_V1.6', position=0, position_by=0))"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"timestamp": "2025-12-04T17:15:07.427154",
|
||||||
|
"version": "V1.6_Adaptive_Complete",
|
||||||
|
"symbol": "XAUUSD",
|
||||||
|
"entry_signal": 1,
|
||||||
|
"confidence": 90.33,
|
||||||
|
"adaptive_threshold": 70,
|
||||||
|
"signal_quality": "excellent",
|
||||||
|
"market_regime": "ranging",
|
||||||
|
"regime_strength": 63.71558532160071,
|
||||||
|
"risk_adjusted_strength": 69756.58765206054,
|
||||||
|
"adaptive_interval": 15,
|
||||||
|
"session": "ny",
|
||||||
|
"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=514641570, order=567326993, volume=0.1, price=4210.53, bid=0.0, ask=0.0, comment='Request executed', request_id=2553087527, retcode_external=0, request=TradeRequest(action=1, magic=234000, order=0, symbol='XAUUSD', volume=0.1, price=4210.57, stoplimit=0.0, sl=4203.832415791341, tp=4226.7839605216495, deviation=20, type=0, type_filling=1, type_time=0, expiration=0, comment='TradingBot_V1.6', position=0, position_by=0))"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"timestamp": "2025-12-04T20:30:06.162421",
|
||||||
|
"version": "V1.6_Adaptive_Complete",
|
||||||
|
"symbol": "XAUUSD",
|
||||||
|
"entry_signal": 1,
|
||||||
|
"confidence": 93.46,
|
||||||
|
"adaptive_threshold": 70,
|
||||||
|
"signal_quality": "excellent",
|
||||||
|
"market_regime": "ranging",
|
||||||
|
"regime_strength": 65.90097047675054,
|
||||||
|
"risk_adjusted_strength": 79422.45120236522,
|
||||||
|
"adaptive_interval": 15,
|
||||||
|
"session": "ny",
|
||||||
|
"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=515122043, order=567873192, volume=0.1, price=4205.16, bid=0.0, ask=0.0, comment='Request executed', request_id=2553087528, retcode_external=0, request=TradeRequest(action=1, magic=234000, order=0, symbol='XAUUSD', volume=0.1, price=4205.2, stoplimit=0.0, sl=4200.731469788589, tp=4215.706325528528, deviation=20, type=0, type_filling=1, type_time=0, expiration=0, comment='TradingBot_V1.6', position=0, position_by=0))"
|
||||||
|
}
|
||||||
|
]
|
||||||
Reference in New Issue
Block a user