OPEN-SOURCE SCRIPT
Double Inside Body Candles with Box & Alert + 5-Bar Lines

This indicator identifies Double Inside Body Candle patterns, where:
Candle 1 is completely inside Candle 2,
Candle 2 is completely inside Candle 3 (the parent candle),
Candle 3 has a real body (not a doji or negligible body size).
Once the pattern is detected:
A label appears below the current candle.
A highlight box is drawn around Candle 3 (the parent candle) body range.
Horizontal lines are drawn from the top and bottom of Candle 3’s body and extend forward for exactly 5 bars to visualize potential breakout levels.
The script also detects and highlights breakouts:
🔼 Bullish breakout: if price closes above Candle 3's body high.
🔽 Bearish breakout: if price closes below Candle 3's body low.
Alerts are available for:
Double Inside Body pattern detection
Bullish breakout
Bearish breakout
Traders can use this script to identify consolidation periods (double inside bars), then monitor for breakout opportunities in either direction, using the 5-bar lines as short-term breakout levels.
Candle 1 is completely inside Candle 2,
Candle 2 is completely inside Candle 3 (the parent candle),
Candle 3 has a real body (not a doji or negligible body size).
Once the pattern is detected:
A label appears below the current candle.
A highlight box is drawn around Candle 3 (the parent candle) body range.
Horizontal lines are drawn from the top and bottom of Candle 3’s body and extend forward for exactly 5 bars to visualize potential breakout levels.
The script also detects and highlights breakouts:
🔼 Bullish breakout: if price closes above Candle 3's body high.
🔽 Bearish breakout: if price closes below Candle 3's body low.
Alerts are available for:
Double Inside Body pattern detection
Bullish breakout
Bearish breakout
Traders can use this script to identify consolidation periods (double inside bars), then monitor for breakout opportunities in either direction, using the 5-bar lines as short-term breakout levels.
開源腳本
本著TradingView的真正精神,此腳本的創建者將其開源,以便交易者可以查看和驗證其功能。向作者致敬!雖然您可以免費使用它,但請記住,重新發佈程式碼必須遵守我們的網站規則。
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。
開源腳本
本著TradingView的真正精神,此腳本的創建者將其開源,以便交易者可以查看和驗證其功能。向作者致敬!雖然您可以免費使用它,但請記住,重新發佈程式碼必須遵守我們的網站規則。
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。