PROTECTED SOURCE SCRIPT
Inside Candle (inside bar) Pattern Detector v1.1

Overview
The Inside Candle Pattern Detector automatically identifies inside bars (also known as inside candles) and displays potential breakout levels on the chart. An inside bar occurs when the current candle’s high is lower than or equal to the previous candle’s high, and its low is higher than or equal to the previous candle’s low.
These patterns often signal periods of market consolidation, which can precede strong breakouts or reversals.
How It Works
1. Detection of Inside Candle
2. Plotting High/Low Levels
3. Extended Lines Option
4. Breakout and Breakdown Signals
The indicator plots small magenta arrows on the chart for each breakout or breakdown:
Arrow up = bullish breakout
Arrow down = bearish breakdown
Inputs
Visuals
Use Cases
Notes
The Inside Candle Pattern Detector automatically identifies inside bars (also known as inside candles) and displays potential breakout levels on the chart. An inside bar occurs when the current candle’s high is lower than or equal to the previous candle’s high, and its low is higher than or equal to the previous candle’s low.
These patterns often signal periods of market consolidation, which can precede strong breakouts or reversals.
How It Works
1. Detection of Inside Candle
- The script checks if the current bar is fully inside the high–low range of the previous bar.
- If true, it marks the previous bar’s high and low as the inside range.
2. Plotting High/Low Levels
- The detected inside bar’s high and low serve as reference breakout levels.
- These levels are plotted on the chart with customizable colors.
3. Extended Lines Option
- Users can choose to extend dashed lines horizontally from the inside bar’s high and low.
- These lines act as dynamic breakout levels until they are breached.
4. Breakout and Breakdown Signals
- A breakout up occurs when price closes above the inside high.
- A breakdown down occurs when price closes below the inside low.
The indicator plots small magenta arrows on the chart for each breakout or breakdown:
Arrow up = bullish breakout
Arrow down = bearish breakdown
Inputs
- Up Breakout Line Color: Sets the color of the inside bar high level and extension line.
- Down Breakout Line Color: Sets the color of the inside bar low level and extension line.
- Show Extended Lines: Toggles dashed breakout levels extended to the right.
Visuals
- Lines: Show the high/low of the inside bar.
- Dashed Extensions: Continue levels forward to help track future breakouts.
- Arrows: Small magenta arrows mark breakouts (up arrows) or breakdowns (down arrows).
Use Cases
- Breakout Trading: Traders can use arrows as confirmation triggers to enter breakout trades.
- Support and Resistance: Inside bar high/low can serve as short-term support or resistance.
- Trend Continuation or Reversal: Inside candles often appear during pauses in price movement, making them useful for anticipating volatility expansion.
Notes
- This is a visual detection tool; it does not generate alerts by default. Alerts can be added manually via TradingView’s alert system if needed.
- The indicator works on any symbol and timeframe.
- For more accurate signals, traders may combine this with trend filters or momentum indicators.
Skrypt chroniony
Ten skrypt został opublikowany jako zamknięty kod źródłowy. Możesz jednak używać go swobodnie i bez żadnych ograniczeń – więcej informacji tutaj.
Unlock powerful tools & indicators → pointalgo.com
Wyłączenie odpowiedzialności
Informacje i publikacje przygotowane przez TradingView lub jego użytkowników, prezentowane na tej stronie, nie stanowią rekomendacji ani porad handlowych, inwestycyjnych i finansowych i nie powinny być w ten sposób traktowane ani wykorzystywane. Więcej informacji na ten temat znajdziesz w naszym Regulaminie.
Skrypt chroniony
Ten skrypt został opublikowany jako zamknięty kod źródłowy. Możesz jednak używać go swobodnie i bez żadnych ograniczeń – więcej informacji tutaj.
Unlock powerful tools & indicators → pointalgo.com
Wyłączenie odpowiedzialności
Informacje i publikacje przygotowane przez TradingView lub jego użytkowników, prezentowane na tej stronie, nie stanowią rekomendacji ani porad handlowych, inwestycyjnych i finansowych i nie powinny być w ten sposób traktowane ani wykorzystywane. Więcej informacji na ten temat znajdziesz w naszym Regulaminie.