Zigzag Candles Supertrend
Aug 22, 2021

The Zigzag Candles Supertrend indicator is a trend-following tool that applies the Supertrend logic to a filtered price series derived from Zigzag-based candle formations. By utilizing Zigzag swings to construct synthetic candles, this tool aims to provide a smoother trend detection mechanism that focuses on significant price movements rather than minor market noise.
Usage
The Usage section focuses on how the indicator adapts the classic Supertrend calculation to its unique data source. It can be used for trend identification, trailing stop-loss placement, and entry signals when the trend direction flips.
- Trend Identification: When the green line is visible, the trend is considered bullish. When the red line is visible, the trend is considered bearish.
- Smoothing Signals: By adjusting the Zigzag Length and Candle Size, users can filter out micro-fluctuations, ensuring the Supertrend only reacts to broader structural changes.
- Custom Data Bases: Users can choose between standard price candles or synthetic Zigzag candles for the calculation. Additionally, the tool allows switching between High/Low or Close prices to define the trend boundaries.
Details
The script functions by first identifying pivots based on a specified length. These pivots are then used to build "Zigzag Candles." A custom ATR (Average True Range) is calculated based on the ranges of these synthetic candles over a defined Moving Average length. The Supertrend line is then projected by applying a multiplier to this custom ATR. This multi-layered filtering process helps in reducing whipsaws commonly found in standard Supertrend implementations during choppy market conditions.
Settings
Core Parameters
- Zigzag Length: Determines the sensitivity of the underlying pivot detection. Higher values result in fewer, more significant pivots.
- Candle Size: Sets the number of zigzag segments used to construct a single synthetic candle.
- MA Length: The lookback period used to calculate the average range for the ATR component.
- ATR Multiplier: Controls the distance of the Supertrend line from the price. A higher multiplier makes the indicator less sensitive to volatility.
Calculation Modes
- Use Zigzag Candles: When enabled, the Supertrend is calculated using the synthetic Zigzag candles. When disabled, it uses standard price bars.
- Use Close Price: Determines whether the calculation uses the candle's closing price or the High/Low extremes for the trend floor and ceiling.
FAQ
- How do I interpret the trend direction? The trend is bullish when the price remains above the green line and bearish when the price remains below the red line.
- How do I access Zigzag Candles Supertrend? You can get access on the LuxAlgo Library for charting platforms like TradingView, MetaTrader (MT4/MT5), and NinjaTrader for free.
- Can I use this for intraday trading? Yes, the indicator is adaptable to any timeframe; however, the Zigzag and Candle Size parameters should be tuned to match the specific volatility of the asset and timeframe being traded.
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.