RobotFX curates the best open-source MetaTrader code to inspire your trading automation.
OVERVIEW
Spread and Daily ATR Risk Meter HUD is a lightweight, zero-buffer on-chart informational indicator for MetaTrader 5. It monitors real-time execution conditions and calculates a reference 1R position size directly from the chart without cluttering candles or adding subwindows.
Experience adaptive trading with the Fluid Expert Advisor for MT4/MT5. Dynamic money management and trend detection. Click for info.
KEY METRICS DISPLAYED
- Live Spread & Pip Conversion: Displays current symbol spread in both points and standard pips, highlighted against a customizable warning threshold (InpWarnSpreadPoints).
- Daily ATR(14) & Today Range Usage (%): Tracks completed Daily ATR points alongside how much of today's average daily range has already been consumed.
- Broker Execution Constraints: Reads live SYMBOL_TRADE_STOPS_LEVEL and SYMBOL_TRADE_FREEZE_LEVEL distances in points.
- 1R Reference Lot Size: Uses OrderCalcProfit() (with automatic tick-value fallback and SYMBOL_VOLUME_STEP normalization) to estimate a disciplined 1R position size for the configured account risk percentage and Daily ATR multiple.
INPUT PARAMETERS
- InpRiskPercent: Target account risk percentage per 1R trade (default: 1.0%).
- InpATRPeriod: Daily ATR calculation period (default: 14).
- InpStopATRMult: Reference stop-loss distance expressed as a multiple of Daily ATR (default: 0.50).
- InpWarnSpreadPoints: Spread threshold in points for elevated-spread visual alert (default: 30).
- InpPositionCorner: Chart corner anchor for the HUD card (CORNER_LEFT_UPPER by default).
- InpOffsetX / InpOffsetY: Horizontal and vertical pixel margins from the selected corner.
INSTALLATION
Copy SpreadATR_RiskMeter.mq5 into your MetaTrader 5 MQL5/Indicators folder, compile in MetaEditor (0 errors, 0 warnings), and attach to any chart. This is a read-only informational HUD indicator and does not place or modify orders.


Level up your trading with professional RobotFX expert advisors and indicators. Visit robotfx.org for proven MT4/MT5 tools.
79500