All indicators

Price-Action Candles

Nov 27, 2023

Static chart image
Price Action BasedCandlestickDashboardPivot Based (Retrospective)

The Price-Action Candles indicator is a comprehensive trend visualization tool that color-codes price bars based on the relationship between current price action and historical swing points.

Usage

The script categorizes trend states into three distinct colors based on swing high and swing low breaches. Traders can use these colors to identify market sentiment and potential trend shifts at a glance:

  • Bullish (Green): Occurs when the market achieves a higher high (current swing high > previous swing high) while the current high exceeds the previous peak, or when the current close is above the current swing high.
  • Bearish (Red): Occurs when the market achieves a lower low (current swing low < previous swing low) while the current low is below the previous trough, or when the current close is below the current swing low.
  • Neutral (Blue/Yellow): Triggered when a new "lower high" or "higher low" is formed, indicating a potential contraction or loss of momentum.

If none of the above conditions are met, the candles retain the color of the previous bar. The indicator also includes a Multi-Timeframe (MTF) trend table at the bottom of the chart to monitor trend alignment across different resolutions.

Details

The core logic relies on pivot points (swings). A swing high/low is defined by a central bar being higher or lower than 'n' bars to its left and right, where 'n' is the "Price-Action Length."

A critical aspect of this tool is the handling of swing confirmation. Because a swing level requires "future" bars to confirm (bars to the right), labels may appear to repaint. The indicator provides two modes for labels:

  • Repaint: Shifts labels back to the actual bar where the price extreme occurred.
  • No-Repaint: Plots the label on the bar where the swing was mathematically confirmed (at the end of the lookback period), ensuring what you see in real-time matches history.

Note that the candle coloring itself does not repaint; only the optional pivot labels are affected by the offset setting.

Settings

  • Price-Action Length: Determines the number of bars required on each side to confirm a swing high or low.
  • Label Type: Choose between "Repaint" (labels shifted to the extreme) or "No-Repaint" (labels shown at confirmation).
  • Candle Color Type: Choose whether to color the "Entire Candle" or just the "Fill Only."
  • Colors: Customizable inputs for Bull, Bear, and Neutral trend states.
  • MTF Trend: Group of settings to enable/disable the trend table and define five different timeframes for analysis.

FAQ

How do I interpret the MTF table?

The table at the bottom shows the trend state (Bullish, Bearish, or Neutral) for your selected timeframes. When multiple timeframes align in color, it suggests a stronger directional bias.

Why do labels appear several bars late?

By definition, a swing point requires a certain number of bars to the right to be confirmed as a peak or trough. The "Price-Action Length" setting dictates this delay.

How can I access the Price-Action Candles?

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.