Loading…

Widest Range Day Projection

A widest-range day is obvious in hindsight from a daily bar chart. This indicator answers the more useful live question: is today, right now, on pace to become one, before the session is over and the opportunity (or the warning to size down volatility exposure) has passed. Every tick it reads the last InpLookbackDays completed daily bars, finds the widest high-low range among them, then divides today's range so far by the fraction of the day elapsed to project a full-day figure. The naive version of this stops there, and produces wild, meaningless projections in the first few minutes of a new day, because a tiny elapsed-time divisor blows the projection up. This clamps the elapsed fraction to InpMinElapsedPercent before dividing, and marks the reading as low-confidence on the dashboard until enough of the day has actually printed. A small on-chart dashboard shows the widest lookback day and its range, today's range and elapsed percentage so far, and the projected full-day range as a percentage of the lookback's widest day. When the projection crosses InpProjectionThreshold with the low-confidence window already passed, one popup alert fires - once per calendar day, not on every tick it stays above the line. Notes and limitations - The projection is a straight linear extrapolation of range against elapsed time. It has no opinion on session-driven volatility shape (e.g. most forex range builds during London/New York overlap, not evenly across 24 hours), so a projection made very early in a quiet Asian session can still overstate the eventual close even past the low-confidence cutoff. Use it as a pace indicator, not a forecast. - Daily range and "elapsed fraction of the day" both use a flat 86400-second day; this is a simplification that does not model weekend gaps or broker-specific session start times. - Requires D1 history to be loaded at least InpLookbackDays + 2 bars deep; on a freshly attached chart with thin history it waits silently until enough bars are available. - Read-only analysis. No trade or stop-loss logic.

Indicator · MT4 · v1.0 · Free

About Widest Range Day Projection

Widest Range Day Projection is an indicator for MetaTrader 4. It can alert you with a pop-up, sound, email or push message. It has 7 settings, such as Lookback days, Projection threshold and Min elapsed percent. MQL source code included.

Files in the download: WidestRangeDayProjection.mq4, WidestRangeDayProjection.txt.

Settings

SettingDefaultWhat it does
Lookback days20Completed daily bars scanned for the widest range
Projection threshold100.0Alert when projected range reaches this % of the lookback's widest day
Min elapsed percent5.0Minimum elapsed-day percent used before projecting (avoids early-day noise)
Alert on pacetruePopup alert the first time today crosses the threshold
CornerCORNER_LEFT_UPPERDashboard corner
Text colorclrWhiteNormal text colour
On pace colorclrOrangeRedText colour once the threshold is crossed

How to install

  1. Download the ZIP from your PolyMaria library and unzip it.
  2. In MetaTrader 4 open File → Open Data Folder, then go to MQL4 → Indicators.
  3. Copy the .mq4 file(s) there. Put any .mqh files in MQL4 → Include.
  4. Open the .mq4 file in MetaEditor and press Compile (F7) if MetaTrader does not show it.
  5. Drag the indicator from the Navigator onto a chart and adjust the settings.

Download the PDF guide

Tags: Alerts · Trading Sessions · MT4 Indicator · MQL4 Source Code

MetaTrader 4 & 5 indicators · PolyMaria