OPEN-SOURCE SCRIPT
Telah dikemas kini Heikin Rider

Heikin Rider
Smoothed Heikin Ashi Breakout Signals with Flow Confirmation
by Ben Deharde, 2025
Overview:
Heikin Rider is a trend-following indicator that detects clean breakout signals using a custom smoothed Heikin Ashi wave (the H-Wave) with optional confirmation from a flow-based filter. It's designed for traders who want precise, momentum-aligned entries.
What It Does:
Plots dynamic high/low bands from smoothed Heikin Ashi candles.
Triggers Buy/Sell signals on full candle breakouts above/below the wave.
Colors bars based on price position and momentum relative to a custom flow line.
Optionally filters signals based on flow direction.
How the H-Wave Works:
The H-Wave is a two-stage smoothed Heikin Ashi construction:
Pre-smoothing: Price is smoothed using a short-length MA (SMA, EMA, or HMA).
HA Calculation: Heikin Ashi values are calculated from the smoothed data.
Post-smoothing: A second, longer MA is applied to the HA values.
Wave Envelope: The high and low wicks of the final smoothed HA candles form the H-Wave envelope.
Signals are generated when price fully breaks this envelope, with optional confirmation from the flow color.
Inputs:
Trend timeframe
Pre/Post smoothing type and length
Flow MA type and length
Toggle for bar coloring and signal filtering
Notes:
Built with original logic, using the open-source TAExt library (credited).
No repainting — all signals are confirmed at close.
For use on standard candles only (not HA or Renko).
Alerts:
Long Signal (Buy)
Short Signal (Sell)
Smoothed Heikin Ashi Breakout Signals with Flow Confirmation
by Ben Deharde, 2025
Overview:
Heikin Rider is a trend-following indicator that detects clean breakout signals using a custom smoothed Heikin Ashi wave (the H-Wave) with optional confirmation from a flow-based filter. It's designed for traders who want precise, momentum-aligned entries.
What It Does:
Plots dynamic high/low bands from smoothed Heikin Ashi candles.
Triggers Buy/Sell signals on full candle breakouts above/below the wave.
Colors bars based on price position and momentum relative to a custom flow line.
Optionally filters signals based on flow direction.
How the H-Wave Works:
The H-Wave is a two-stage smoothed Heikin Ashi construction:
Pre-smoothing: Price is smoothed using a short-length MA (SMA, EMA, or HMA).
HA Calculation: Heikin Ashi values are calculated from the smoothed data.
Post-smoothing: A second, longer MA is applied to the HA values.
Wave Envelope: The high and low wicks of the final smoothed HA candles form the H-Wave envelope.
Signals are generated when price fully breaks this envelope, with optional confirmation from the flow color.
Inputs:
Trend timeframe
Pre/Post smoothing type and length
Flow MA type and length
Toggle for bar coloring and signal filtering
Notes:
Built with original logic, using the open-source TAExt library (credited).
No repainting — all signals are confirmed at close.
For use on standard candles only (not HA or Renko).
Alerts:
Long Signal (Buy)
Short Signal (Sell)
Nota Keluaran
Updated to eliminate lookahead bias when requesting higher-timeframe smoothed Heikin Ashi data. This was done by: Changing lookahead=barmerge.lookahead_on to lookahead=barmerge.lookahead_offApplying a [1] offset to the returned values (haOpen, haHigh, haLow, haClose)
→ This ensures only completed higher-timeframe candles are used.
Nota Keluaran
Longer and refined description:Heikin Rider
Smoothed Heikin Ashi Breakout Signals with Flow Confirmation
by Ben Deharde, 2025
Overview:
Heikin Rider is a breakout indicator that combines a two-stage smoothed Heikin Ashi envelope (the H-Wave) with a custom flow-based filter derived from moving averages. The goal is to detect clean trend-following signals with optional momentum confirmation.
What It Does:
- Plots a smoothed Heikin Ashi high/low envelope (the H-Wave).
- Generates Buy/Sell signals when full candles break above or below this wave.
- Calculates a custom flow line using moving averages to measure underlying directional pressure.
- Colors bars dynamically based on flow behavior.
- Allows signal filtering based on whether the current flow direction matches the breakout.
How It Works:
1. H-Wave Envelope (Heikin Ashi + Moving Averages):
The H-Wave is built using a multi-timeframe, double-smoothing process:
Pre-smoothing: Price data is first smoothed using a selected moving average (SMA, EMA, or HMA) over a short period.
Heikin Ashi Calculation: Standard HA formulas are applied to the smoothed prices.
Post-smoothing: The HA values are then smoothed again with a longer-period moving average (e.g., HMA 150).
The smoothed high and low wicks of these candles form the H-Wave envelope.
This wave adapts to trend strength and acts as a dynamic breakout channel. Breakouts are only confirmed when the entire candle range (including wicks) exceeds the prior high or low of the H-Wave.
2. Flow Line (Price-Derived Formula + MA Smoothing):
The flow line measures underlying price direction using a custom formula:
flowBase = (2 × (open[1] + close[1])) − high − low − open
This value captures pressure relative to recent bar structure. It is then smoothed using a selectable moving average: Options include EMA, SMA, WMA, HMA, or RMA.
A long smoothing length (default: 500) filters out noise and emphasizes trend consistency.
The flow line becomes a soft directional guide.
Bar coloring is based on: Whether price is above or below the flow line.
Whether the flow delta (distance from price to flow) is increasing or decreasing.
3. Signal Confirmation Logic:
Buy Signal: Triggered when the full price candle breaks above the previous H-Wave high.
Sell Signal: Triggered when the full candle breaks below the previous H-Wave low.
If flow filtering is enabled, signals only fire if flow color agrees (e.g., bullish bar color during a bullish breakout).
How to Use:
Use signal labels as trend breakouts with optional momentum filtering.
Bar colors help assess trend context even without signals.
Fine-tune with different smoothing types and lengths to fit your strategy.
Inputs:
- Trend timeframe for Heikin Ashi base logic
- Pre/Post smoothing lengths and types
- Flow smoothing type and length
- Toggle: Enable Flow Coloring
- Toggle: Require Flow Match for Signal
Originality:
Heikin Rider introduces blend of multi-timeframe Heikin Ashi smoothing with an innovative flow filter based on a price-derived formula. The result is a structured yet adaptive breakout system with optional trend confirmation.
The Heikin Ashi smoothing is powered by the open-source TAExt library by @wallneradam (credited).
Alerts:
Long Signal — breakout above H-Wave high
Short Signal — breakout below H-Wave low
Skrip sumber terbuka
Dalam semangat sebenar TradingView, pencipta skrip ini telah menjadikannya sumber terbuka supaya pedagang dapat menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupun anda boleh menggunakannya secara percuma, ingat bahawa menerbitkan semula kod ini adalah tertakluk kepada Peraturan Dalaman kami.
Penafian
Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.
Skrip sumber terbuka
Dalam semangat sebenar TradingView, pencipta skrip ini telah menjadikannya sumber terbuka supaya pedagang dapat menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupun anda boleh menggunakannya secara percuma, ingat bahawa menerbitkan semula kod ini adalah tertakluk kepada Peraturan Dalaman kami.
Penafian
Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.