Watch how to download trading robots for free
Find us on Twitter!
Join our fan page
Interesting script?
So post a link to it -
let others appraise it
You liked the script? Try it in the MetaTrader 5 terminal
Indicators

Server-Midnight Daily Floating Drawdown and Spread Spike HUD - indicator for MetaTrader 5

Denis Remy Khansa
Denis Remy Khansa
Founder of Azimuth Studio — Compiled CPU Walk-Forward & Multi-EA Portfolio Studio for MetaTrader 5
Views:
46
Rating:
(1)
Published:
MQL5 Freelance Need a robot or indicator based on this code? Order it on Freelance Go to Freelance
Many multi-EA traders and prop-firm challengers get surprised when their daily loss limit triggers even though closed trades for the day are flat or slightly positive.

In practice, two mechanics cause almost all unexpected daily drawdown breaches in MetaTrader 5:
1. At the 00:00 server reset, most evaluation rules anchor the new daily reference on Max(Balance, Floating Equity) rather than closed Balance alone. Carrying open unrealized profit across midnight raises the daily high-water mark, so a normal pullback the next morning counts directly against the daily allowance.
2. Between 23:00 and 00:15 server time, raw ECN spreads routinely widen 5x to 35x, creating brief floating equity dips (plus overnight swaps) that never show up in M1 OHLC Strategy Tester runs.

What This Indicator Does (100% Read-Only, Zero Orders, Zero DLLs):
Attach Azimuth_Midnight_Drawdown_HUD.mq5 to any MetaTrader 5 chart. It updates once per second and on every incoming tick without placing or modifying any trades:

- Exact Midnight Anchor Tracking: supports Max(Balance, Equity) at reset (default), Balance Only, or Equity Only, at any configurable server reset hour/minute.
- Restart-Safe Persistence: stores today's midnight anchor and worst intraday floating drawdown peak in account-scoped GlobalVariables so restarting MT5 mid-session does not erase the true 00:00 reference (automatically isolated inside Strategy Tester).
- Remaining Daily Buffer: displays live Daily DD (% and account currency), Today's Peak DD, and exact remaining distance before your configured limit (default 5.0%, warning state at 80% of limit).
- Per-Magic-Number Attribution: aggregates closed deals since reset + open floating P&L + swaps by Magic Number (sorted worst-first) so you can immediately see which EA is consuming your daily drawdown budget.
- Live & 23:00-00:15 Rollover Spread Tracker: displays current spread in pips alongside today's max spread and the 23:00-00:15 rollover peak.

Inputs:
- InpAnchorMode: Max(Balance, Equity) at Reset | Balance Only | Equity Only
- InpResetHour / InpResetMinute: Broker server reset time (default 00:00)
- InpMaxDailyLossPct: Daily drawdown limit in percent (default 5.0)
- InpWarnRatioPct: Warning color threshold as % of limit (default 80.0)
- InpRolloverSpikePips: Spread highlight threshold in pips (default 3.0)
- InpCornerX / InpCornerY: Chart pixel coordinates for the HUD panel

Server-Midnight Daily Floating Drawdown and Rollover Spread HUD
Execution Quality Recorder Execution Quality Recorder

Records every fill on the account and shows how it was executed: slippage against the requested price on entries and on stop-loss and take-profit exits, the spread at the fill and the execution delay. Per-symbol panel, hour-by-hour heatmap, CSV log and a side-by-side broker comparison. It does not trade.

Order Error and Retcode Classifier Library Order Error and Retcode Classifier Library

MQL5 include library (#include) for classifying trade server retcodes into retryable transient conditions versus stop-level, margin, volume, or permission rejections. Provides structured diagnostics, suggested retry delays, and formatted log summaries with zero DLLs or WebRequest calls.

MAE and MFE of closed trades MAE and MFE of closed trades

Writes the MAE and MFE of every closed position to a CSV file, in price, account money and R. Read-only.

MACD Signals MACD Signals

Indicator edition for new platform.