Files
XauBot/backtests/comparison_results/simple_backtest.log
T

64 lines
7.9 KiB
Plaintext
Raw Normal View History

2026-02-09 20:39:10.330 | INFO  | __main__:main:32 - ============================================================
2026-02-09 20:39:10.330 | INFO  | __main__:main:33 - SIMPLE BACKTEST: H1 Bias vs M5 Confirmation
2026-02-09 20:39:10.330 | INFO  | __main__:main:34 - ============================================================
2026-02-09 20:39:12.837 | INFO  | src.mt5_connector:connect:177 - Connected to MT5: FinexBisnisSolusi-Demo (Account: 61045904)
2026-02-09 20:39:13.338 | INFO  | __main__:main:57 - Fetching 14 days of data...
2026-02-09 20:39:13.547 | DEBUG  | src.mt5_connector:get_market_data:449 - Fetched 1344 bars for XAUUSD M15
2026-02-09 20:39:13.976 | DEBUG  | src.mt5_connector:get_market_data:449 - Fetched 4032 bars for XAUUSD M5
2026-02-09 20:39:13.976 | INFO  | src.mt5_connector:disconnect:203 - Disconnected from MT5
2026-02-09 20:39:13.976 | INFO  | __main__:main:65 - M15 bars: 1344, M5 bars: 4032
2026-02-09 20:39:13.976 | INFO  | __main__:main:68 - Calculating features and SMC...
2026-02-09 20:39:13.982 | DEBUG  | src.feature_eng:calculate_rsi:130 - RSI calculated (period=14)
2026-02-09 20:39:13.984 | DEBUG  | src.feature_eng:calculate_atr:185 - ATR calculated (period=14)
2026-02-09 20:39:13.985 | DEBUG  | src.feature_eng:calculate_macd:243 - MACD calculated (12/26/9)
2026-02-09 20:39:13.986 | DEBUG  | src.feature_eng:calculate_bollinger_bands:301 - Bollinger Bands calculated (period=20, std=2.0)
2026-02-09 20:39:13.988 | DEBUG  | src.feature_eng:calculate_ema_crossover:357 - EMA crossover calculated (9/21)
2026-02-09 20:39:13.989 | DEBUG  | src.feature_eng:calculate_volume_features:403 - Volume features calculated (period=20)
2026-02-09 20:39:13.992 | DEBUG  | src.smc_polars:calculate_swing_points:401 - Swing points: 81 highs, 84 lows
2026-02-09 20:39:13.994 | DEBUG  | src.smc_polars:calculate_fvg:312 - FVG calculation complete. Bullish: 178, Bearish: 107
2026-02-09 20:39:13.996 | DEBUG  | src.smc_polars:calculate_order_blocks:511 - Order Blocks: 60 bullish, 56 bearish
2026-02-09 20:39:14.000 | DEBUG  | src.smc_polars:calculate_bos_choch:599 - BOS: 20 bullish, 10 bearish
2026-02-09 20:39:14.000 | DEBUG  | src.smc_polars:calculate_bos_choch:600 - CHoCH: 16 bullish, 17 bearish
2026-02-09 20:39:14.002 | DEBUG  | src.feature_eng:calculate_rsi:130 - RSI calculated (period=14)
2026-02-09 20:39:14.005 | DEBUG  | src.feature_eng:calculate_atr:185 - ATR calculated (period=14)
2026-02-09 20:39:14.007 | DEBUG  | src.feature_eng:calculate_macd:243 - MACD calculated (12/26/9)
2026-02-09 20:39:14.009 | DEBUG  | src.feature_eng:calculate_bollinger_bands:301 - Bollinger Bands calculated (period=20, std=2.0)
2026-02-09 20:39:14.011 | DEBUG  | src.feature_eng:calculate_ema_crossover:357 - EMA crossover calculated (9/21)
2026-02-09 20:39:14.012 | DEBUG  | src.feature_eng:calculate_volume_features:403 - Volume features calculated (period=20)
2026-02-09 20:39:14.015 | DEBUG  | src.smc_polars:calculate_swing_points:401 - Swing points: 236 highs, 248 lows
2026-02-09 20:39:14.018 | DEBUG  | src.smc_polars:calculate_fvg:312 - FVG calculation complete. Bullish: 539, Bearish: 383
2026-02-09 20:39:14.021 | DEBUG  | src.smc_polars:calculate_order_blocks:511 - Order Blocks: 181 bullish, 170 bearish
2026-02-09 20:39:14.033 | DEBUG  | src.smc_polars:calculate_bos_choch:599 - BOS: 68 bullish, 41 bearish
2026-02-09 20:39:14.033 | DEBUG  | src.smc_polars:calculate_bos_choch:600 - CHoCH: 42 bullish, 42 bearish
2026-02-09 20:39:14.046 | INFO  | __main__:main:87 - H1 bars: 337
2026-02-09 20:39:14.046 | INFO  | __main__:main:90 - 
============================================================
2026-02-09 20:39:14.046 | INFO  | __main__:main:91 - BACKTEST 1: H1 BIAS
2026-02-09 20:39:14.047 | INFO  | __main__:main:92 - ============================================================
2026-02-09 20:39:14.070 | INFO  | __main__:main:191 - 
============================================================
2026-02-09 20:39:14.070 | INFO  | __main__:main:192 - BACKTEST 2: M5 CONFIRMATION
2026-02-09 20:39:14.070 | INFO  | __main__:main:193 - ============================================================
2026-02-09 20:39:14.080 | INFO  | __main__:main:279 - 
============================================================
2026-02-09 20:39:14.080 | INFO  | __main__:main:280 - RESULTS COMPARISON
2026-02-09 20:39:14.080 | INFO  | __main__:main:281 - ============================================================
Metric H1 Bias M5 Confirm Improvement
-----------------------------------------------------------------
Total Trades 0 0 +0
Wins 0 0 +0
Losses 0 0 +0
Win Rate 0.0% 0.0% +0.0%
Total P/L $0.00 $0.00 $+0.00
Avg Win $0.00 $0.00 $+0.00
Avg Loss $0.00 $0.00 $+0.00
Traceback (most recent call last):
File "C:\Users\Administrator\Videos\Smart Automatic Trading BOT + AI\backtests\simple_h1_vs_m5.py", line 346, in <module>
main()
~~~~^^
File "C:\Users\Administrator\Videos\Smart Automatic Trading BOT + AI\backtests\simple_h1_vs_m5.py", line 322, in main
print(f"{'Profit Factor':<20} {m_h1['profit_factor']:.2f}{'':<12} {m_m5['profit_factor']:.2f}{'':<12} {m_m5['profit_factor']-m_h1['profit_factor']:+.2f}")
~~~~^^^^^^^^^^^^^^^^^
KeyError: 'profit_factor'