Trade Discipline Guardian MT5
- Utilities
-
Nguyen Thanh Trieu
I'm a software developer and trader. I build practical tools for MetaTrader 5 that I use in my own trading.
My work covers market structure, price action logic, risk visualization, and custom indicators and utilities. - Version: 1.1
- Updated: 20 October 2026
- Activations: 10
Trade Discipline Guardian MT5 is an advanced utility designed to enforce strict risk management and capital preservation protocols on your trading account. It operates as an automated compliance layer, ensuring your equity remains within predefined daily and overall drawdown limits. Ideal for accounts with strict drawdown guidelines, funded challenge evaluations, and professional capital management requirements.
The utility monitors all positions in real time (every 100ms) across your entire account, regardless of the chart or symbol it is attached to. It operates silently in the background, executing capital protection actions when threshold values are approached or breached.
---Key Features Table
| Feature Category | Specification / Mechanism | Operational Benefit |
|---|---|---|
| Anti-Tilt Shield | Consecutive loss circuit breaker with cooling-off lockout | Eliminates revenge trading spirals by locking out orders after loss streaks. |
| Daily Trade Quota | Hard daily execution limit tracker | Stops overtrading by capping total allowable trades per 24 hours. |
| Tamper-Proof Lock | Persistent session & binary state protection | Auto-liquidates rogue orders placed during active disciplinary cooldowns. |
| Drawdown Guard | Real-time daily and overall equity loss tracking ($ or %) | Prevents account breaches by closing all trades when limits are reached. |
| Trailing Equity Lock | Profit Lock (Ratchet) system with trailing offset ($ or %) | Secures gains during market reversals by locking in equity peaks. |
| Macro Filter | News blocker filtering by impact, symbol, and keywords | Restricts trading or deletes SL/TP before high-impact economic news. |
| Invisible Target Levels | Ghost Stop Loss (SL) and Take Profit (TP) levels | Monitors levels internally, hiding trade targets from external brokers. |
| Closed P/L Limits | Rolling performance tracking (Hourly, Daily, Weekly, Monthly) | Blocks new orders or closes all trades if specific loss/profit limits are met. |
| Streak Protection | Consecutive loss limit (Loss Streak Control) | Pauses trading for a defined duration after a series of losing trades. |
| Exposure Control | Max positions and maximum total lot limit caps | Limits trading volume and size to avoid accidental overexposure. |
| Safety Monitors | SL Guard (missing Stop Loss monitoring) | Alerts or closes positions immediately if trades are opened without a Stop Loss. |
| Session Safeguards | End-of-Day (EOD) and Friday Close protection | Closes all trades before market close or weekends to avoid swap and gap risks. |
Detailed Protection Modules
- Real-Time Equity Monitoring: Scans account equity every 100ms. Compares live values to defined limits and acts before manual intervention is required.
- Soft and Hard Protection Modes: Soft Mode triggers a warning with a countdown timer before taking action, allowing manual intervention. Hard Mode executes immediately when a threshold is breached.
- Flexible Calculations: Define your drawdown and target parameters either as fixed USD amounts or percentage-based calculations (using current balance or reference balance).
- News Blocker (Forex Factory Integration): Integrates with macroeconomic calendars to block trade execution or remove pending SL/TP levels before news events. Includes automatic restoration of SL/TP levels after the event passes.
- Multi-Timeframe Performance Tracker: Monitors cumulative closed P/L. Set thresholds for maximum allowed losses or target gains across rolling Hourly, Daily, Weekly, and Monthly timeframes.
- Loss Streak Blocker: Automatically pauses trading when consecutive loss limits are hit, helping you avoid emotional or revenge trading.
- Time-Based Closures: Automatically terminates open positions a defined number of minutes before midnight or ahead of the weekend close (supporting Server, Local, or UTC time).
- Missing SL Detection (SL Guard): Ensures every active position has a hard Stop Loss. Sends notifications or closes positions if an order is placed without an SL.
Technical Specifications & Installation
- Single Chart Setup: Only needs to be attached to a single chart (any major pair like EURUSD or GBPUSD, M1 timeframe recommended) to monitor the entire account.
- Execution Compatibility: Fully compatible with Hedging and Netting account types.
- Zero DLL Dependency: No external DLL imports required, ensuring absolute security and compatibility with MQL5 Cloud Protector.
- Interactive Dashboard: Features a visual canvas panel showing current drawdown, peak equity, rolling P/L statistics, active filters, and quick confirmation buttons.
Disclaimer & Risk Disclosure
This utility is a risk-monitoring tool designed to execute predefined protection rules. It does not generate trading signals, modify active trade directions, or guarantee profitability. All protection thresholds must be defined by the user according to their specific risk tolerance and broker environment. Slippage, execution delays, and market gaps may affect final exit prices during high-impact news or low-liquidity periods.
