OPEN-SOURCE SCRIPT
已更新 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)
發行說明
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.
發行說明
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
開源腳本
本著TradingView的真正精神,此腳本的創建者將其開源,以便交易者可以查看和驗證其功能。向作者致敬!雖然您可以免費使用它,但請記住,重新發佈程式碼必須遵守我們的網站規則。
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。
開源腳本
本著TradingView的真正精神,此腳本的創建者將其開源,以便交易者可以查看和驗證其功能。向作者致敬!雖然您可以免費使用它,但請記住,重新發佈程式碼必須遵守我們的網站規則。
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。