OPEN-SOURCE SCRIPT
3 Consecutive Same Color Candles

This TradingView Pine Script detects when three consecutive candlesticks are either all bullish (green) or all bearish (red). It plots a triangle marker above or below the candle to visually signal the pattern and optionally triggers alerts.
How It Works:
A green signal (triangle up) appears below the third candle if the last 3 candles closed higher than they opened (bullish).
A red signal (triangle down) appears above the third candle if the last 3 candles closed lower than they opened (bearish).
Alerts can be set up to notify you immediately when the pattern forms.
Use Case on the 10-Minute Chart:
On the 10-minute chart, this script helps you spot short-term momentum buildups in either direction.
Bullish Signal (3 Green Candles):
Suggests buyers are gaining control.
Can be used to:
Enter breakout trades
Confirm trend continuation
Prepare for scalp entries or momentum trades
Bearish Signal (3 Red Candles):
Indicates sellers are applying pressure.
Can help:
Spot pullbacks or trend reversals
Set up for short positions
Warn of potential breakdowns
Example Trading Ideas:
Pair with EMA or support/resistance for confirmation.
Use as a momentum filter in scalping systems.
Combine with volume or RSI divergence to gauge strength or exhaustion.
How It Works:
A green signal (triangle up) appears below the third candle if the last 3 candles closed higher than they opened (bullish).
A red signal (triangle down) appears above the third candle if the last 3 candles closed lower than they opened (bearish).
Alerts can be set up to notify you immediately when the pattern forms.
Use Case on the 10-Minute Chart:
On the 10-minute chart, this script helps you spot short-term momentum buildups in either direction.
Bullish Signal (3 Green Candles):
Suggests buyers are gaining control.
Can be used to:
Enter breakout trades
Confirm trend continuation
Prepare for scalp entries or momentum trades
Bearish Signal (3 Red Candles):
Indicates sellers are applying pressure.
Can help:
Spot pullbacks or trend reversals
Set up for short positions
Warn of potential breakdowns
Example Trading Ideas:
Pair with EMA or support/resistance for confirmation.
Use as a momentum filter in scalping systems.
Combine with volume or RSI divergence to gauge strength or exhaustion.
Skrip sumber terbuka
Dalam semangat sebenar TradingView, pencipta skrip ini telah menjadikannya sumber terbuka supaya pedagang dapat menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupun anda boleh menggunakannya secara percuma, ingat bahawa menerbitkan semula kod ini adalah tertakluk kepada Peraturan Dalaman kami.
Penafian
Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.
Skrip sumber terbuka
Dalam semangat sebenar TradingView, pencipta skrip ini telah menjadikannya sumber terbuka supaya pedagang dapat menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupun anda boleh menggunakannya secara percuma, ingat bahawa menerbitkan semula kod ini adalah tertakluk kepada Peraturan Dalaman kami.
Penafian
Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.