OPEN-SOURCE SCRIPT
IU Inside/Harami candlestick pattern

DESCRIPTION
The IU Inside/Harami Candlestick Pattern indicator is designed to detect bullish and bearish inside bar formations, also known as Harami patterns. This tool gives users flexibility by allowing pattern detection based on candle wicks, bodies, or a combination of both. It highlights detected patterns using colored boxes and optional text labels on the chart, helping traders quickly identify areas of consolidation and potential reversals.
USER INPUTS :
Pattern Recognition Based on =
Choose between "Wicks", "Body", or "Both" to determine how the inside candle pattern is identified.
Show Box =
Toggle the appearance of colored boxes that highlight the pattern zone.
Show Text =
Toggle on-screen labels for "Bullish Inside" or "Bearish Inside" when patterns are detected.
INDICATOR LOGIC :
Bullish Inside Bar (Harami) is detected when:
* The current candle's high is lower and low is higher than the previous candle (wick-based),
* or the current candle’s open and close are inside the previous candle’s body (body-based),
* and the current candle is bullish while the previous is bearish.
Bearish Inside Bar (Harami) is detected when:
* The current candle's high is lower and low is higher than the previous candle (wick-based),
* or the current candle’s open and close are inside the previous candle’s body (body-based),
* and the current candle is bearish while the previous is bullish.
The user can choose wick-based, body-based, or both logics for pattern confirmation.
Boxes are drawn between the highs and lows of the pattern, and alert messages are generated upon confirmation.
Optional labels show the pattern name for quick visual identification.
WHY IT IS UNIQUE :
Offers three different logic modes: wick-based, body-based, or combined.
Highlights patterns visually with customizable boxes and labels.
Includes built-in alerts for immediate notifications.
Uses clean and transparent plotting without repainting.
HOW USER CAN BENEFIT FROM IT :
Receive real-time alerts when Inside/Harami patterns are formed.
Use the boxes and text labels to spot price compression zones and breakout potential.
Combine it with other tools like trendlines or support/resistance for enhanced accuracy.
Suitable for scalpers, swing traders, and price action traders looking to trade inside bar breakouts or reversals.
DISCLAIMER :
This indicator is not financial advice, it's for educational purposes only highlighting the power of coding( pine script) in TradingView, I am not a SEBI-registered advisor. Trading and investing involve risk, and you should consult with a qualified financial advisor before making any trading decisions. I do not guarantee profits or take responsibility for any losses you may incur.
The IU Inside/Harami Candlestick Pattern indicator is designed to detect bullish and bearish inside bar formations, also known as Harami patterns. This tool gives users flexibility by allowing pattern detection based on candle wicks, bodies, or a combination of both. It highlights detected patterns using colored boxes and optional text labels on the chart, helping traders quickly identify areas of consolidation and potential reversals.
USER INPUTS :
Pattern Recognition Based on =
Choose between "Wicks", "Body", or "Both" to determine how the inside candle pattern is identified.
Show Box =
Toggle the appearance of colored boxes that highlight the pattern zone.
Show Text =
Toggle on-screen labels for "Bullish Inside" or "Bearish Inside" when patterns are detected.
INDICATOR LOGIC :
Bullish Inside Bar (Harami) is detected when:
* The current candle's high is lower and low is higher than the previous candle (wick-based),
* or the current candle’s open and close are inside the previous candle’s body (body-based),
* and the current candle is bullish while the previous is bearish.
Bearish Inside Bar (Harami) is detected when:
* The current candle's high is lower and low is higher than the previous candle (wick-based),
* or the current candle’s open and close are inside the previous candle’s body (body-based),
* and the current candle is bearish while the previous is bullish.
The user can choose wick-based, body-based, or both logics for pattern confirmation.
Boxes are drawn between the highs and lows of the pattern, and alert messages are generated upon confirmation.
Optional labels show the pattern name for quick visual identification.
WHY IT IS UNIQUE :
Offers three different logic modes: wick-based, body-based, or combined.
Highlights patterns visually with customizable boxes and labels.
Includes built-in alerts for immediate notifications.
Uses clean and transparent plotting without repainting.
HOW USER CAN BENEFIT FROM IT :
Receive real-time alerts when Inside/Harami patterns are formed.
Use the boxes and text labels to spot price compression zones and breakout potential.
Combine it with other tools like trendlines or support/resistance for enhanced accuracy.
Suitable for scalpers, swing traders, and price action traders looking to trade inside bar breakouts or reversals.
DISCLAIMER :
This indicator is not financial advice, it's for educational purposes only highlighting the power of coding( pine script) in TradingView, I am not a SEBI-registered advisor. Trading and investing involve risk, and you should consult with a qualified financial advisor before making any trading decisions. I do not guarantee profits or take responsibility for any losses you may incur.
開源腳本
本著TradingView的真正精神,此腳本的創建者將其開源,以便交易者可以查看和驗證其功能。向作者致敬!雖然您可以免費使用它,但請記住,重新發佈程式碼必須遵守我們的網站規則。
Shivam mandai
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。
開源腳本
本著TradingView的真正精神,此腳本的創建者將其開源,以便交易者可以查看和驗證其功能。向作者致敬!雖然您可以免費使用它,但請記住,重新發佈程式碼必須遵守我們的網站規則。
Shivam mandai
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。