OPEN-SOURCE SCRIPT
Inside Bar Coloring (Real-time + Historical) w/ Alerts

Description
This Pine Script v6 indicator identifies and colors inside bars, whose entire range (high and low) stays within the previous bar's range. It gives the option to color the real-time bar as well as historical inside bars.
Inside bars are colored differently based on whether they close above or below their opening price (bullish vs bearish). The indicator offers flexible display options including real-time-only highlighting, historical inside bar visualization with transparency, and optional triangle markers for enhanced visibility.
Utility
Inside bars represent periods of market consolidation and reduced volatility, and are by nature consolidating. During this equilibrium, it can be valuable to observe price development rather than engage with it. Conversely, a break of the equilibrium often marks a shift in volatility and provides opportunity. This indicator provides instant visual identification of this price action on your chart.
Features
Settings
This Pine Script v6 indicator identifies and colors inside bars, whose entire range (high and low) stays within the previous bar's range. It gives the option to color the real-time bar as well as historical inside bars.
Inside bars are colored differently based on whether they close above or below their opening price (bullish vs bearish). The indicator offers flexible display options including real-time-only highlighting, historical inside bar visualization with transparency, and optional triangle markers for enhanced visibility.
Utility
Inside bars represent periods of market consolidation and reduced volatility, and are by nature consolidating. During this equilibrium, it can be valuable to observe price development rather than engage with it. Conversely, a break of the equilibrium often marks a shift in volatility and provides opportunity. This indicator provides instant visual identification of this price action on your chart.
Features
- Smart Coloring System: Separate colors for bullish (close ≥ open) and bearish (close < open) inside bars
- Flexible Display Modes: Show only real-time bar, all historical bars, or customize transparency levels
- Visual Markers: Optional triangles above or below inside bars
- Real-time Alerts: Configurable alerts notify you when new inside bars form
- Optimized Performance: Efficient Pine Script v6 code with minimal resource usage
- Open Source: Released under Mozilla Public License 2.0
Settings
- Customizable colors for bullish/bearish inside bars (real-time and historical)
- Toggle historical inside bar display
- Real-time bar only mode for clean charts
- Adjustable marker position (above/below bars)
- Alert activation with detailed price information
開源腳本
本著TradingView的真正精神,此腳本的創建者將其開源,以便交易者可以查看和驗證其功能。向作者致敬!雖然您可以免費使用它,但請記住,重新發佈程式碼必須遵守我們的網站規則。
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。
開源腳本
本著TradingView的真正精神,此腳本的創建者將其開源,以便交易者可以查看和驗證其功能。向作者致敬!雖然您可以免費使用它,但請記住,重新發佈程式碼必須遵守我們的網站規則。
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。