OPEN-SOURCE SCRIPT
已更新 BB with Heikin Ashi + Reversal Check

This indicator combines Bollinger Bands (BB) with Heikin Ashi candles to detect potential reversal points after price breaks the BB boundaries. It works on any symbol and timeframe, retrieving Heikin Ashi data via request.security().
Core Features
Heikin Ashi Candle Plot
Smooths price action by using Heikin Ashi candles instead of regular candles.
Candles are plotted directly on the chart with green (bullish) and red (bearish) colors.
Bollinger Bands (BB)
Calculated from Heikin Ashi close price.
Includes Basis (MA), Upper Band, and Lower Band, with customizable MA type, length, and standard deviation multiplier.
Break & Reversal Detection
The indicator tracks whether the price has broken above the Upper Band (p1) or below the Lower Band (p2).
It remembers the last breakout direction until the opposite breakout occurs (mutually exclusive logic).
Signal Logic
Long Signal (▲):
Price was previously below the Lower Band and then reversed upward (BB Lower rising + Heikin Ashi candle rising).
Short Signal (▼):
Price was previously above the Upper Band and then reversed downward (BB Upper falling + Heikin Ashi candle falling).
Alerts
Custom alert conditions trigger when Long or Short signals occur, allowing automated notifications or bot integration.
Use Cases
✅ Swing Trading / Trend Reversal – Identify potential bottom/top reversals after BB breakouts.
✅ Mean Reversion Strategies – Enter trades when the price reverts to the BB mean after an extreme breakout.
✅ Multi-Timeframe Analysis – Works with any timeframe and symbol via request.security().
Customization
MA Type: SMA, EMA, RMA, WMA, VWMA
BB Length & StdDev Multiplier
Timeframe & Symbol Selection
Core Features
Heikin Ashi Candle Plot
Smooths price action by using Heikin Ashi candles instead of regular candles.
Candles are plotted directly on the chart with green (bullish) and red (bearish) colors.
Bollinger Bands (BB)
Calculated from Heikin Ashi close price.
Includes Basis (MA), Upper Band, and Lower Band, with customizable MA type, length, and standard deviation multiplier.
Break & Reversal Detection
The indicator tracks whether the price has broken above the Upper Band (p1) or below the Lower Band (p2).
It remembers the last breakout direction until the opposite breakout occurs (mutually exclusive logic).
Signal Logic
Long Signal (▲):
Price was previously below the Lower Band and then reversed upward (BB Lower rising + Heikin Ashi candle rising).
Short Signal (▼):
Price was previously above the Upper Band and then reversed downward (BB Upper falling + Heikin Ashi candle falling).
Alerts
Custom alert conditions trigger when Long or Short signals occur, allowing automated notifications or bot integration.
Use Cases
✅ Swing Trading / Trend Reversal – Identify potential bottom/top reversals after BB breakouts.
✅ Mean Reversion Strategies – Enter trades when the price reverts to the BB mean after an extreme breakout.
✅ Multi-Timeframe Analysis – Works with any timeframe and symbol via request.security().
Customization
MA Type: SMA, EMA, RMA, WMA, VWMA
BB Length & StdDev Multiplier
Timeframe & Symbol Selection
發行說明
overlay=false發行說明
overlay=true,scale = scale.none發行說明
candleUp = ta.rising(haClose,1) and haClose>haHigh[1]candleDown = ta.falling(haClose,1) and haClose<haLow[1]
開源腳本
本著TradingView的真正精神,此腳本的創建者將其開源,以便交易者可以查看和驗證其功能。向作者致敬!雖然您可以免費使用它,但請記住,重新發佈程式碼必須遵守我們的網站規則。
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。
開源腳本
本著TradingView的真正精神,此腳本的創建者將其開源,以便交易者可以查看和驗證其功能。向作者致敬!雖然您可以免費使用它,但請記住,重新發佈程式碼必須遵守我們的網站規則。
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。