OPEN-SOURCE SCRIPT

pD Zones [MMT]

468
pD Zones [MMT] plots a clean set of intraday high‑of‑day (HOD) and low‑of‑day (LOD) zones that automatically extend forward, flip color on mitigation, and archive as historical levels for context. It is designed to give intraday traders a simple visual map of premium/discount zones derived from a chosen calculation timeframe.​

Overview
  • Objective: Highlight the current day’s HOD/LOD wick zones as actionable intraday support and resistance.​
  • Core logic runs on a user‑selectable source timeframe (default 15m), then projects those zones onto any chart you are trading.​
  • Zones extend into the future, react to price via mitigation logic, and then optionally roll into a dimmed historical layer.


Zone logic
  • Each session, the script tracks the extreme high and low plus their wick limits (open/close‑based) on the source timeframe to form two intraday zones.​
  • When a new day starts, the finalized prior‑day zones are “locked in” and the current day begins tracking a fresh HOD/LOD pair.​
  • Only one HOD and one LOD zone are created per day, reducing clutter and keeping focus on the most relevant levels.


Mitigation & color flips
  • Active HOD zones behave as resistance: a decisive break above the top of the box flips it to a bullish (supportive) color profile, while a move back below can re‑flip it.​
  • Active LOD zones behave as support: a break below the bottom of the box flips it to a bearish profile, and a sustained reclaim can re‑flip it as well.​
  • Once mitigated and carried into a new day, zones are restyled with a softer historical color so they remain visible but unobtrusive.​


Alerts
  • When price breaks a HOD zone to the upside, the script can trigger an alert message noting that HOD resistance has been broken and showing the exact level.​
  • When price breaks a LOD zone to the downside, an alert notes that LOD support has been broken, again with the precise price printed.​
  • These alerts are meant for intraday confirmation of structure shifts at key daily extremes, rather than frequent scalper signals.


Inputs & customization
- Calculation Timeframe: choose which timeframe defines the daily HOD/LOD zones (e.g., 5m, 15m, 1h), independent from the chart.​
- Visual Settings: customize support/resistance fill colors and border color to integrate with existing layouts.​
- Logic Settings:
  • Max Active Zones: cap how many live zones remain on the chart at once to control noise.​
  • Max Historical Zones: keep only the most recent historical levels or show all past days.​
  • Zone Extension Offset (Bars): control how aggressively boxes project into the future.​

- Mitigation Settings: choose the historical zone color to distinguish active levels from archived ones at a glance.​

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.