OPEN-SOURCE SCRIPT
Green & Red Triple Overlap Candle

Green & Red Triple Overlap Candle
Three candles of the same colour that go nowhere.
One side spends three candles in a row pushing, and at the end of it price is still sitting in the
same band it started in. The candles do not step away from each other, they fold back over each other. That is the whole pattern, and it is the opposite of what three same-coloured candles are usually assumed to mean.
The middle candle is the reference. The first and the third clamp its body from opposite ends, and the band they clamp is what gets drawn.
THE TWO PATTERNS
A candle is Green when close is greater than open, and Red when close is less than open. A Doji,
where close equals open, is neither and takes no part. Only fully closed candles are read; the
candle still forming is never used.
Green Triple Overlap
Candle 1, Candle 2 and Candle 3 are all Green
Candle 1 HIGH is at or above Candle 2 CLOSE it already reached the top of the middle body
Candle 3 LOW is at or below Candle 2 OPEN it came back down to the bottom of it
Red Triple Overlap
Candle 1, Candle 2 and Candle 3 are all Red
Candle 1 LOW is at or below Candle 2 CLOSE it already reached the bottom of the middle body
Candle 3 HIGH is at or above Candle 2 OPEN it came back up to the top of it
That is the whole definition. Three colours and two reaches, all on the same group of candles.
WHAT IT ACTUALLY SAYS
Three green candles in a row is normally read as strength. Here it is not, and the two reaches are what change the reading.
Candle 1's high already being at Candle 2's close means the second candle finished the whole of
its work inside ground the first one had already covered. It closed where the previous candle had merely traded. No new territory.
Candle 3's low coming back to Candle 2's open means the third candle handed back the entire middle body before doing whatever it did. Everything the second candle gained was given up and bought again.
Put together: three candles of buying pressure, and the group is still standing on the same band. Buyers keep arriving and something keeps meeting them. The pattern marks absorption, not thrust.
The red side is the same story with the roles swapped.
WHAT MAKES THIS DIFFERENT
1. It is not Three White Soldiers, and reading it as such inverts the meaning.
Three White Soldiers is a staircase: each candle opens inside the previous body and closes beyond it, so the group walks upward. This is the opposite construction. Each candle folds back over the middle one, so the group stands still. Both are three same-coloured candles, and that is where the similarity ends.
2. The comparison is against the BODY, not the range.
Both reaches are measured against Candle 2's open and close, not its high and low. Wicks on the
middle candle change nothing. That keeps the test on where price actually settled rather than on how far it briefly poked, which is what makes the pattern uncommon instead of everywhere.
3. The middle candle is a fixed reference, not just the one in between.
Candle 1 is checked against one edge of it and Candle 3 against the other. The two conditions
point in opposite directions on purpose - that opposition is what clamps the band.
4. Two candles doing this is not the pattern.
Any two adjacent candles overlap to some degree. It takes a third, reaching back the other way, before the group can be said to have gone nowhere. Nothing is reported until all three are closed and all three conditions hold.
5. Same colour throughout is mandatory.
A mixed group is a reversal story and is already well covered by engulfing and pin bar tools. Here every candle belongs to the same side, which is what makes the lack of progress worth noticing at all.
READING THE CHART
Each detected pattern draws a solid box over the MIDDLE candle's body - the band that was clamped - stretched across all three candles.
Green Triple Overlap drawn in the bullish colour, label below the group
Red Triple Overlap drawn in the bearish colour, label above the group
Labels are parked outside the whole three-candle group rather than on the box, so the text always clears the price action. The box itself is often thin, because the middle body is the thing being measured, and a thin box is information: it means the three candles were argued out in a very narrow band.
An optional outline draws the full high-to-low range of the three candles around that band. Turn it on to see how much room the group used in total against how little it kept. It is off by default so the clamped band stays the focus, but on a chart zoomed far out it is also the easiest way to spot where the patterns are, because the band on its own is only as tall as one candle body.
The band can also be run out to the right edge, which turns it from a marker of what happened into a level you can watch price return to. That is off by default as well. The range outline is never extended - it describes three particular candles, not a price that is still live.
A summary table in the corner counts how many of each type were found inside the current scan window. It counts every pattern found, including a type that is currently switched off, so the table always reflects what the market actually printed rather than what is on screen.
SETTINGS
Scan
- Scan Length: how many closed candles are scanned backwards from the latest bar. The running candle is always excluded.
Pattern Types
- A switch for Green Triple Overlap and one for Red Triple Overlap.
- Show Full Candle Range: outlines the whole height of the three candles around the clamped band.
Zone Style
- Bullish and Bearish colours, and the fill transparency of the band. The full range outline is
always drawn lighter than the band it surrounds.
- Extend Zones Right: runs the clamped band out to the right edge so you can see where price sits against it now. Only the band is extended, never the range outline.
Labels
- Show Labels, Label Size, and Label Distance from Candles as a percentage of the group's full
height. Increase the distance on noisy charts so labels clear the candles.
Summary Table
- Show, position and size of the corner table.
ALERTS
Two alert conditions: Green Triple Overlap and Red Triple Overlap.
Each message carries the pattern name, the symbol, the timeframe and the closing price. The same messages are also sent through the alert function, so the "Any alert() function call" alert type can deliver both through a single alert.
All alerts are evaluated only after a candle has fully closed.
REPAINTING
This script does not repaint.
- Detection reads confirmed candles only. The scan starts far enough behind the latest bar that
the candle still forming is never part of any group.
- Every alert signal is written so that it can only become true once a candle has finished. Price
moving inside an open candle cannot make a signal appear and then disappear.
- Boxes are rebuilt on the last bar using confirmed history. A box that has been drawn does not
move or change afterwards. It only leaves the chart when it falls outside the Scan Length
window.
When you create an alert, TradingView may show a caution banner saying the indicator can repaint. That banner appears automatically for any script that uses the built in bar state variables, no matter how they are used, because the platform cannot check the intent behind them. This script uses them for the opposite purpose: one of them is what restricts every signal to bar close, and the other is what redraws the boxes efficiently on the final bar. Choosing "Once Per Bar Close" when creating the alert is still recommended.
NOTES AND LIMITATIONS
- The pattern is uncommon by design. Three candles have to share a colour and then reach back
across each other in opposite directions. Stretches with nothing on the chart are normal. If you
want to see more of them, look at a faster timeframe rather than loosening anything.
- Doji candles take no part. A group containing one is never reported, because a Doji has no
direction to share.
- Increasing Scan Length raises the number of drawing objects, and switching the full range outline on doubles the boxes. TradingView caps these at 500 boxes and 500 labels, and the oldest are dropped once a cap is reached. The default is chosen to stay well inside those limits.
- Overlapping groups are possible. Three candles can belong to one pattern while the next three, shifted by one, form another, so boxes may sit next to or inside each other.
- Detection is purely structural. It reports where the shape occurred and nothing more. It does not rank patterns by quality, measure follow through, or produce entries, targets or stops.
HOW TO USE IT
The box marks a band that one side defended for three candles running. Traders commonly watch these areas for:
- A reaction when price returns to the band later, since it was contested once already
- Continuation once price finally leaves the band, because the side that was absorbed has spent
three candles worth of effort with nothing to show for it
- Context alongside higher timeframe structure, where absorption against the larger trend reads differently from absorption with it
The edges of the box - the middle candle's open and close - are the two prices the group kept
returning to, and they are usually the more interesting part of it.
These are reference areas, not entry signals on their own. Use them alongside your own support and resistance mapping, your own entry method and proper risk management.
DISCLAIMER
This indicator is a pattern detection tool. It is not financial advice and it makes no claim about
profitability. Trading involves risk. Always apply your own analysis and risk management.
Three candles of the same colour that go nowhere.
One side spends three candles in a row pushing, and at the end of it price is still sitting in the
same band it started in. The candles do not step away from each other, they fold back over each other. That is the whole pattern, and it is the opposite of what three same-coloured candles are usually assumed to mean.
The middle candle is the reference. The first and the third clamp its body from opposite ends, and the band they clamp is what gets drawn.
THE TWO PATTERNS
A candle is Green when close is greater than open, and Red when close is less than open. A Doji,
where close equals open, is neither and takes no part. Only fully closed candles are read; the
candle still forming is never used.
Green Triple Overlap
Candle 1, Candle 2 and Candle 3 are all Green
Candle 1 HIGH is at or above Candle 2 CLOSE it already reached the top of the middle body
Candle 3 LOW is at or below Candle 2 OPEN it came back down to the bottom of it
Red Triple Overlap
Candle 1, Candle 2 and Candle 3 are all Red
Candle 1 LOW is at or below Candle 2 CLOSE it already reached the bottom of the middle body
Candle 3 HIGH is at or above Candle 2 OPEN it came back up to the top of it
That is the whole definition. Three colours and two reaches, all on the same group of candles.
WHAT IT ACTUALLY SAYS
Three green candles in a row is normally read as strength. Here it is not, and the two reaches are what change the reading.
Candle 1's high already being at Candle 2's close means the second candle finished the whole of
its work inside ground the first one had already covered. It closed where the previous candle had merely traded. No new territory.
Candle 3's low coming back to Candle 2's open means the third candle handed back the entire middle body before doing whatever it did. Everything the second candle gained was given up and bought again.
Put together: three candles of buying pressure, and the group is still standing on the same band. Buyers keep arriving and something keeps meeting them. The pattern marks absorption, not thrust.
The red side is the same story with the roles swapped.
WHAT MAKES THIS DIFFERENT
1. It is not Three White Soldiers, and reading it as such inverts the meaning.
Three White Soldiers is a staircase: each candle opens inside the previous body and closes beyond it, so the group walks upward. This is the opposite construction. Each candle folds back over the middle one, so the group stands still. Both are three same-coloured candles, and that is where the similarity ends.
2. The comparison is against the BODY, not the range.
Both reaches are measured against Candle 2's open and close, not its high and low. Wicks on the
middle candle change nothing. That keeps the test on where price actually settled rather than on how far it briefly poked, which is what makes the pattern uncommon instead of everywhere.
3. The middle candle is a fixed reference, not just the one in between.
Candle 1 is checked against one edge of it and Candle 3 against the other. The two conditions
point in opposite directions on purpose - that opposition is what clamps the band.
4. Two candles doing this is not the pattern.
Any two adjacent candles overlap to some degree. It takes a third, reaching back the other way, before the group can be said to have gone nowhere. Nothing is reported until all three are closed and all three conditions hold.
5. Same colour throughout is mandatory.
A mixed group is a reversal story and is already well covered by engulfing and pin bar tools. Here every candle belongs to the same side, which is what makes the lack of progress worth noticing at all.
READING THE CHART
Each detected pattern draws a solid box over the MIDDLE candle's body - the band that was clamped - stretched across all three candles.
Green Triple Overlap drawn in the bullish colour, label below the group
Red Triple Overlap drawn in the bearish colour, label above the group
Labels are parked outside the whole three-candle group rather than on the box, so the text always clears the price action. The box itself is often thin, because the middle body is the thing being measured, and a thin box is information: it means the three candles were argued out in a very narrow band.
An optional outline draws the full high-to-low range of the three candles around that band. Turn it on to see how much room the group used in total against how little it kept. It is off by default so the clamped band stays the focus, but on a chart zoomed far out it is also the easiest way to spot where the patterns are, because the band on its own is only as tall as one candle body.
The band can also be run out to the right edge, which turns it from a marker of what happened into a level you can watch price return to. That is off by default as well. The range outline is never extended - it describes three particular candles, not a price that is still live.
A summary table in the corner counts how many of each type were found inside the current scan window. It counts every pattern found, including a type that is currently switched off, so the table always reflects what the market actually printed rather than what is on screen.
SETTINGS
Scan
- Scan Length: how many closed candles are scanned backwards from the latest bar. The running candle is always excluded.
Pattern Types
- A switch for Green Triple Overlap and one for Red Triple Overlap.
- Show Full Candle Range: outlines the whole height of the three candles around the clamped band.
Zone Style
- Bullish and Bearish colours, and the fill transparency of the band. The full range outline is
always drawn lighter than the band it surrounds.
- Extend Zones Right: runs the clamped band out to the right edge so you can see where price sits against it now. Only the band is extended, never the range outline.
Labels
- Show Labels, Label Size, and Label Distance from Candles as a percentage of the group's full
height. Increase the distance on noisy charts so labels clear the candles.
Summary Table
- Show, position and size of the corner table.
ALERTS
Two alert conditions: Green Triple Overlap and Red Triple Overlap.
Each message carries the pattern name, the symbol, the timeframe and the closing price. The same messages are also sent through the alert function, so the "Any alert() function call" alert type can deliver both through a single alert.
All alerts are evaluated only after a candle has fully closed.
REPAINTING
This script does not repaint.
- Detection reads confirmed candles only. The scan starts far enough behind the latest bar that
the candle still forming is never part of any group.
- Every alert signal is written so that it can only become true once a candle has finished. Price
moving inside an open candle cannot make a signal appear and then disappear.
- Boxes are rebuilt on the last bar using confirmed history. A box that has been drawn does not
move or change afterwards. It only leaves the chart when it falls outside the Scan Length
window.
When you create an alert, TradingView may show a caution banner saying the indicator can repaint. That banner appears automatically for any script that uses the built in bar state variables, no matter how they are used, because the platform cannot check the intent behind them. This script uses them for the opposite purpose: one of them is what restricts every signal to bar close, and the other is what redraws the boxes efficiently on the final bar. Choosing "Once Per Bar Close" when creating the alert is still recommended.
NOTES AND LIMITATIONS
- The pattern is uncommon by design. Three candles have to share a colour and then reach back
across each other in opposite directions. Stretches with nothing on the chart are normal. If you
want to see more of them, look at a faster timeframe rather than loosening anything.
- Doji candles take no part. A group containing one is never reported, because a Doji has no
direction to share.
- Increasing Scan Length raises the number of drawing objects, and switching the full range outline on doubles the boxes. TradingView caps these at 500 boxes and 500 labels, and the oldest are dropped once a cap is reached. The default is chosen to stay well inside those limits.
- Overlapping groups are possible. Three candles can belong to one pattern while the next three, shifted by one, form another, so boxes may sit next to or inside each other.
- Detection is purely structural. It reports where the shape occurred and nothing more. It does not rank patterns by quality, measure follow through, or produce entries, targets or stops.
HOW TO USE IT
The box marks a band that one side defended for three candles running. Traders commonly watch these areas for:
- A reaction when price returns to the band later, since it was contested once already
- Continuation once price finally leaves the band, because the side that was absorbed has spent
three candles worth of effort with nothing to show for it
- Context alongside higher timeframe structure, where absorption against the larger trend reads differently from absorption with it
The edges of the box - the middle candle's open and close - are the two prices the group kept
returning to, and they are usually the more interesting part of it.
These are reference areas, not entry signals on their own. Use them alongside your own support and resistance mapping, your own entry method and proper risk management.
DISCLAIMER
This indicator is a pattern detection tool. It is not financial advice and it makes no claim about
profitability. Trading involves risk. Always apply your own analysis and risk management.
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.
Explore more trading tools & resources on my official website: rwbtradelab.com | Telegram: t.me/rwbtradelab
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.
Explore more trading tools & resources on my official website: rwbtradelab.com | Telegram: t.me/rwbtradelab
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.