OPEN-SOURCE SCRIPT

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

151
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
  • 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

Feragatname

Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, işlem veya diğer türden tavsiye veya tavsiyeler anlamına gelmez ve teşkil etmez. Kullanım Şartları'nda daha fazlasını okuyun.