Two-Part Supply & Demand Zones with Role Reversal
Oct 5, 2025

The Two-Part Supply & Demand Zones with Role Reversal indicator identifies high-probability liquidity zones and automatically manages their state based on price action and role reversal logic. It provides traders with a dynamic view of market structure by distinguishing between weak and strong zone components and updating them in real-time as they are tested or breached.
Usage
The Usage section focuses on how the tool identifies and interacts with supply and demand areas.
- Zone Identification: The tool looks for "base" candles with small bodies followed by an "impulse" candle. When these conditions are met at swing highs or lows, a zone is plotted.
- Two-Part Logic: Zones are split into "weak" and "strong" sections. If price touches the weak section (often the wick area), the box shrinks to focus only on the remaining strong area.
- Role Reversal (Flipping): If price closes entirely through a strong zone, the script does not simply delete it. Instead, it "flips" the zone's polarity. A broken demand zone becomes a supply zone, and a broken supply zone becomes a demand zone, reflecting the concept of Support becoming Resistance and vice versa.
- Zone Depletion: If price penetrates the strong part of the zone without flipping (or after being tested), the zone is removed to maintain chart clarity.
Details
The script uses specific price action calculations to qualify a zone:
- Base Candle: Calculated using the ratio of the candle body to its total range. Only candles with a ratio below the "Max base candle body ratio" are considered valid bases.
- Impulse Candle: Requires the following candle's body to be significantly larger (based on the Impulse Multiplier) than the base candle's body, signifying a strong departure from the zone.
- Zone Lifecycle: The indicator manages zones using an array system, ensuring that only active, relevant zones are displayed. It uses
boxandlabelobjects that are dynamically updated or deleted based on closing prices relative to the zone boundaries.
Settings
- Max base candle body ratio: Determines how "tight" the base candle must be. A lower value requires a smaller body relative to the wick range.
- Min impulse body × base body: Sets the required strength of the breakout. A higher value ensures that only very strong moves create new zones.
- Zone extend bars: Controls how many bars into the future the supply and demand boxes are projected.
FAQ
How do I access the Two-Part Supply & Demand Zones with Role Reversal?
You can get access on the LuxAlgo Library for charting platforms like TradingView, MetaTrader (MT4/MT5), and NinjaTrader for free.
What is the difference between the weak and strong parts of a zone?
The weak part typically represents the initial wick rejection area, while the strong part represents the core body/structural level. The indicator shrinks the zone when the weak part is tested to show that the initial "buffer" has been used.
Why do some zones change color?
This is the Role Reversal feature. When a supply zone is decisively broken to the upside, it changes from red to green, indicating it may now act as demand.
Free indicator
Get free access to this indicator on the platforms below.
Unlock the entire LuxAlgo Library
Every indicator, every strategy, full charts, and complete access to Quant — our AI agent.