All indicators

Supply/Demand

Jan 13, 2021

Static chart image
Support and ResistanceDrawing ToolFibonacci

The Supply/Demand indicator tool automatically identifies and plots key market levels including pivot highs/lows and Fibonacci retracement zones to assist in locating potential areas of institutional interest.

Usage

The script is designed to visualize market structure across multiple timeframes. By plotting horizontal dashed lines, it highlights critical levels that may act as support or resistance.

  • Intraday Trading: On lower timeframes, the script identifies short-term pivot levels and Fibonacci retracements (23.6%, 38.2%, 61.8%, 76.8%) calculated from recent price action.
  • Swing Trading: On daily timeframes, the indicator identifies supply and demand points of interest, often represented by purple lines or specific color-coded levels.
  • Trend Analysis: Using the 1.272 extension levels (gray lines) helps in identifying potential trend exhaustion or extension targets.

Details

The indicator calculates its levels based on recent price extremes (highest high and lowest low over a lookback period). On intraday charts, it uses a 50-period lookback, while on daily charts, it uses a 30-period lookback.

The Fibonacci levels are derived from the range between these extremes:

  • Red Line: Pivot High
  • Green Line: Pivot Low
  • Black Line: 0.236 Retracement
  • Blue Line: 0.382 Retracement
  • Green Dashed: 0.618 Retracement
  • Purple Line: 0.786 Retracement
  • Gray Lines: 1.272 Extensions (calculated from both high and low)

The script also utilizes request.security to fetch higher timeframe data (Daily, Weekly, Monthly) to ensure that the levels remain relevant even when viewing lower timeframe charts.

Settings

  • Daily Resolution: Sets the timeframe used for daily level calculations (Default: Weekly).
  • Weekly Resolution: Sets the timeframe used for weekly level calculations (Default: Monthly).
  • Monthly Resolution: Sets the timeframe used for monthly level calculations (Default: 3-Month).
  • Right Line Extension: A toggle to extend the plotted lines to the right side of the chart for better visibility.

FAQ

How do I use the Supply/Demand indicator for entries?

Users typically look for price rejection or consolidation around the plotted Fibonacci and pivot levels. For example, a bounce off the 0.618 level (green dashed line) may indicate a continuation of the primary trend.

What do the gray lines represent?

The gray lines represent the 1.272 Fibonacci extension. These are often used as "overextended" markers where price might find resistance after a breakout or support after a breakdown.

How can I access this indicator?

You can get access on the LuxAlgo Library for charting platforms like TradingView, MetaTrader (MT4/MT5), and NinjaTrader for free.

Free indicator

Get free access to this indicator on the platforms below.

TradingView
NinjaTrader
MetaTrader 4/5

Unlock the entire LuxAlgo Library

Every indicator, every strategy, full charts, and complete access to Quant — our AI agent.