All indicators

Doji Structure Psych Levels Supply and Demand

May 25, 2026

Static chart image
Support and ResistanceCandlestickDashboardMoving AveragesPatterns

The Doji · Structure · Psych Levels indicator provides a comprehensive price action toolkit that automatically identifies candlestick patterns, market structure pivots, supply and demand zones, and psychological price levels. This tool aims to streamline technical analysis by highlighting key technical confluence areas where price reversals or continuations are likely to occur.

Usage

The Usage section describes how the script can be used to identify market conditions and potential trade setups.

Candlestick Pattern Recognition

The indicator monitors the chart for specific reversal and continuation patterns including Doji Stars, Gravestone/Dragonfly Dojis, Hammers, and Shooting Stars. These are visual cues for potential shifts in momentum. Additionally, the script detects Engulfing Candles based on user-defined body multipliers to ensure only significant momentum shifts are highlighted.

Market Structure and Supply/Demand

The tool identifies swing highs and swing lows to label Market Structure (HH, HL, LH, LL). These pivots help determine the current trend direction.

  • Supply Zones: Created when a strong bearish impulse candle occurs after a period of consolidation (basing).
  • Demand Zones: Created when a strong bullish impulse candle follows a consolidation phase. The zones extend into the future to act as potential support or resistance areas.

Psychological Levels

Large institutions and retail traders often react to "round numbers." The indicator automatically plots horizontal levels at .000 (Major) and .500 (Minor) intervals based on the current price range to highlight areas where liquidity often clusters.

Trend Dashboard

A trend label in the top-right corner calculates the relationship between a Fast, Slow, and Filter EMA to provide a quick bias assessment (Bullish, Bearish, or Ranging).

Details

The script utilizes specific logic to filter out market noise:

  • Impulse Detection: Supply and Demand zones are only formed if a candle's body accounts for a significant percentage of its total range and exceeds a minimum ATR (Average True Range) threshold. This ensures zones are created by genuine volatility.
  • Pivot Lookback: Market structure is determined using the ta.pivot function with a configurable lookback period, ensuring that only significant swing points are labeled.
  • Dynamic Scaling: The psychological levels automatically adjust their step (e.g., every 1.0, 10, or 100 points) based on the asset's price to maintain relevance across different instruments like Forex, Stocks, or Crypto.

Settings

Candlestick Patterns

  • Doji/Hammer/Star Toggles: Enable or disable specific candle patterns.
  • Doji Body %: Defines the maximum size of a candle body relative to its range to be considered a Doji.
  • Wick Ratio: Sets the required length of the wick relative to the body for Hammers and Shooting Stars.

Engulfing Candles

  • Body Multiplier: Requires the engulfing candle's body to be X times larger than the previous candle's body.
  • Min Current/Prev Body %: Filters out candles with disproportionately large wicks.

Supply & Demand Zones

  • Impulse Body % of Range: The minimum body size required for a candle to be considered an "impulse" move.
  • Min ATR Multiplier: Ensures the impulse move is volatile enough relative to recent price action.
  • Base Candles to Look Back: Determines how many candles prior to the impulse are used to define the width of the zone.

Market Structure & Psych Levels

  • Pivot Lookback: The number of bars required on either side of a high/low to confirm a pivot point.
  • Levels Above/Below: The number of psychological lines to draw above and below the current market price.
  • Fast/Slow/Trend EMA: Configures the periods for the EMAs used in the trend dashboard.

FAQ

How do I interpret the Supply and Demand zones? Supply and Demand zones represent areas where significant institutional buying or selling occurred. When price returns to these zones, they often act as areas of high interest for entries or profit-taking.

Can I change the sensitivity of the trend dashboard? Yes, by adjusting the Fast, Slow, and Trend EMA settings, as well as the Range Sensitivity %, you can make the trend label more or less reactive to recent price changes.

How can I access the Doji · Structure · Psych Levels 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.