I cannot access external URLs or links. Please provide the actual chat history content directly in your message, and I'll generate an appropriate title for you.


This is a shared MuleRun session containing an iterative code review and enhancement of a MetaTrader 5 Expert Advisor called SmartMoneyStrategy_V3_fixed (an MQ5 Smart Money Concepts trading bot). Here's what the session covered:


Session Summary

1. Initial Code Review — A full audit of the 5,569-line EA identifying critical bugs:

  • AI dynamic parameters written but never read (completely non-functional)
  • Partial close using reverse orders (breaks on hedging accounts)
  • Hardcoded ORDER_FILLING_IOC (fails with some brokers)
  • AI independent mode bypassing all SMC filters

2. Bug Fixes (7 categories, 15 code changes) — Including AI parameter integration, PositionClosePartial, dynamic filling mode detection, RSI threshold parameterization, and breakout detection relaxation.

3. S/R-Based TP/SL Integration — ~420 lines added: support/resistance levels used as take-profit and stop-loss references with 3 modes (hybrid, pure S/R, TP-only S/R), safety mechanisms, and chart visualization.

4. FVG & S/R Drawing Fixes — Detection functions were only called inside the trend strategy, so they never ran in range/breakout/scalp modes. Also fixed FVG rectangle coordinate mapping.

5. RSI Sub-Chart — ~270 lines: pixel-level canvas-drawn RSI indicator at the bottom of the main chart with overbought/oversold zones, area fills, and current value indicator.

6. Panel Beautification — Full rebuild from OBJ_LABEL text to CCanvas pixel rendering with gradient headers, progress bars, status dots, dynamic highlighting, and auto-sizing sections.

The final output was the patched .mq5 file.


SmartMoneyStrategy_V3_fixed Upgrade Version 2.0 Complete Code Review Report

1. Last Fix Item Verification

9 previously reported issues all fixed: AI dynamic parameters, ClosePartial, filling mode detection, RSI parameterization, breakout detection relaxation, FVG/SR detection enhanced to OnTick, etc., have all been correctly applied.


2. Newly Discovered Problems (21 items total)

  1. Critical (2 items)

    • AI independent mode bypassing all safety filters
    • AI independent mode without SL/TP orders
  2. High (5 items)

    • EMA line drawing barShift offset
    • OTT line drawing also offset
    • PanelUpdate recursion without depth protection
    • GlobalVariable cross EA contamination
    • Scalp indicator handle not created automatically when Regime activates
  3. Medium (7 items)

    • Continuous loss statistics only check the last deal
    • TP1 trailing stop wrong direction for Short
    • DrawStructure swing points barShift offset
    • ATR tracking stop uses current unfinished candle, applies to completed candle
    • CalcTrailDistance boundary conditions might be negative
    • Scalp daily trade count might be incorrect upon EA restarts
    • AI JSON parser using simple string search, not robust
  4. Low (7 items)

    • Involves OTT false signal risks, performance overhead from frequently deleting and recreating panel objects, side effects of modifying global variables, etc.

3. Most Critical Issues

  • Issues #1 & #2 (AI independent mode) are the most dangerous: when InpAIMode=1 or in mixed mode, AI signal might execute trades with SL=0, TP=0 (no-stop-loss naked orders), bypassing daily trading limits.
  • Issue #9 (Short trailing stop direction error) could set stop losses in the wrong direction after TP1 triggers.

Would you like me to address these issues? We can prioritize from critical to low.