OPEN-SOURCE SCRIPT
Opposite Candle Zone Identifier (v6) - Extended

🔍 Opposite Candle Zone Identifier (Extended)
Opposite Candle Zone Identifier is a price-action based indicator designed to identify potential reversal or absorption zones by detecting candles that move against the surrounding trend.
The indicator highlights a central opposite candle (or group of candles) that is surrounded by candles moving in the opposite direction, both before and after the central candle.
This structure often represents areas where institutional activity, absorption, or supply/demand imbalance may occur.
📌 How the Indicator Works
The indicator analyzes price action using three configurable blocks:
1️⃣ Candles Before (Backward)
A user-defined number of candles before the central candle(s) must follow a consistent trend:
Bullish candles for a bearish zone
Bearish candles for a bullish zone
2️⃣ Central Candle(s)
The core of the pattern:
Default: 1 opposite candle
Can be increased (up to 5) to adapt the indicator to lower timeframes or noisier markets
This central block must move against the previous trend, signaling a potential shift or absorption area.
3️⃣ Candles After (Forward)
A user-defined number of candles after the central candle(s) must resume the original trend, confirming the pattern.
⚠️ The signal is confirmed only after the “after” candles are completed.
This avoids repainting and ensures structural confirmation.
📐 Zone Concept
The highlighted central candle (or candles) can be used to define a price zone:
The high and low of the central candle(s) represent a potential supply or demand zone
These zones can be used for:
Reversal areas
Reaction zones
Entry refinement
Stop placement
⚙️ Inputs & Customization
Number of candles before
Controls how many candles must follow the initial trend.
Number of candles after
Defines how many candles are required for confirmation.
Central candles count
Default is 1, but can be increased (e.g. 2) for:
Lower timeframes
More reliable structure
Reduced noise
ATR-based offset
Labels are positioned using a dynamic ATR offset to improve chart readability across different markets and timeframes.
📈 Bullish & Bearish Zones
🟢 Bullish Zone
Bearish candles before
Bullish central candle(s)
Bearish candles after
Indicates potential demand or accumulation zone
🔴 Bearish Zone
Bullish candles before
Bearish central candle(s)
Bullish candles after
Indicates potential supply or distribution zone
🧠 Best Use Cases
Works best on 15m and higher timeframes
Effective on:
Indices
Forex majors
Liquid cryptocurrencies
Can be combined with:
Trend filters (EMA, VWAP)
Support & resistance
Market structure analysis
⚠️ Notes
This indicator is confirmation-based, not predictive
Signals appear only after pattern completion
It does not repaint
Best used as a confluence tool, not as a standalone trading system
🎯 Summary
Opposite Candle Zone Identifier helps traders:
Detect opposite-direction candles within strong trends
Identify potential supply and demand zones
Adapt the pattern to different timeframes
Improve price-action based decision making
Opposite Candle Zone Identifier is a price-action based indicator designed to identify potential reversal or absorption zones by detecting candles that move against the surrounding trend.
The indicator highlights a central opposite candle (or group of candles) that is surrounded by candles moving in the opposite direction, both before and after the central candle.
This structure often represents areas where institutional activity, absorption, or supply/demand imbalance may occur.
📌 How the Indicator Works
The indicator analyzes price action using three configurable blocks:
1️⃣ Candles Before (Backward)
A user-defined number of candles before the central candle(s) must follow a consistent trend:
Bullish candles for a bearish zone
Bearish candles for a bullish zone
2️⃣ Central Candle(s)
The core of the pattern:
Default: 1 opposite candle
Can be increased (up to 5) to adapt the indicator to lower timeframes or noisier markets
This central block must move against the previous trend, signaling a potential shift or absorption area.
3️⃣ Candles After (Forward)
A user-defined number of candles after the central candle(s) must resume the original trend, confirming the pattern.
⚠️ The signal is confirmed only after the “after” candles are completed.
This avoids repainting and ensures structural confirmation.
📐 Zone Concept
The highlighted central candle (or candles) can be used to define a price zone:
The high and low of the central candle(s) represent a potential supply or demand zone
These zones can be used for:
Reversal areas
Reaction zones
Entry refinement
Stop placement
⚙️ Inputs & Customization
Number of candles before
Controls how many candles must follow the initial trend.
Number of candles after
Defines how many candles are required for confirmation.
Central candles count
Default is 1, but can be increased (e.g. 2) for:
Lower timeframes
More reliable structure
Reduced noise
ATR-based offset
Labels are positioned using a dynamic ATR offset to improve chart readability across different markets and timeframes.
📈 Bullish & Bearish Zones
🟢 Bullish Zone
Bearish candles before
Bullish central candle(s)
Bearish candles after
Indicates potential demand or accumulation zone
🔴 Bearish Zone
Bullish candles before
Bearish central candle(s)
Bullish candles after
Indicates potential supply or distribution zone
🧠 Best Use Cases
Works best on 15m and higher timeframes
Effective on:
Indices
Forex majors
Liquid cryptocurrencies
Can be combined with:
Trend filters (EMA, VWAP)
Support & resistance
Market structure analysis
⚠️ Notes
This indicator is confirmation-based, not predictive
Signals appear only after pattern completion
It does not repaint
Best used as a confluence tool, not as a standalone trading system
🎯 Summary
Opposite Candle Zone Identifier helps traders:
Detect opposite-direction candles within strong trends
Identify potential supply and demand zones
Adapt the pattern to different timeframes
Improve price-action based decision making
Script open-source
Nello spirito di TradingView, l'autore di questo script lo ha reso open source, in modo che i trader possano esaminarne e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricordiamo che la ripubblicazione del codice è soggetta al nostro Regolamento.
Declinazione di responsabilità
Le informazioni e le pubblicazioni non sono intese come, e non costituiscono, consulenza o raccomandazioni finanziarie, di investimento, di trading o di altro tipo fornite o approvate da TradingView. Per ulteriori informazioni, consultare i Termini di utilizzo.
Script open-source
Nello spirito di TradingView, l'autore di questo script lo ha reso open source, in modo che i trader possano esaminarne e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricordiamo che la ripubblicazione del codice è soggetta al nostro Regolamento.
Declinazione di responsabilità
Le informazioni e le pubblicazioni non sono intese come, e non costituiscono, consulenza o raccomandazioni finanziarie, di investimento, di trading o di altro tipo fornite o approvate da TradingView. Per ulteriori informazioni, consultare i Termini di utilizzo.