OPEN-SOURCE SCRIPT
Two Consecutive Candles Alert - Toggle Alerts

🔹 Overview:
This indicator identifies when two consecutive candles of the same color appear on the chart—bullish (green) or bearish (red). It highlights the second candle of the streak and optionally triggers an alert, helping traders spot short-term momentum shifts or continuation patterns.
🔹 How It Works:
Candle Detection: The script checks the last three candles.
The second candle in a pair is marked only if it follows a candle of the same color and is not part of a longer streak.
Marking:
Bullish second candles are marked with a green triangle below the bar.
Bearish second candles are marked with a red triangle above the bar.
Alerts (Optional):
Traders can enable or disable alerts independently for bullish or bearish setups using checkboxes in the settings.
Alerts are triggered only on the second candle of a two-candle streak.
🔹 Inputs / Settings:
Enable Bullish Candle Alerts ✅
Enable Bearish Candle Alerts ✅
🔹 Use Case:
Identify short-term trend momentum.
Spot potential continuation setups after two consecutive candles of the same type.
Combine with other indicators for confirmation (e.g., support/resistance, moving averages).
🔹 Notes:
The indicator marks only the second candle in a two-candle streak to avoid marking longer streaks multiple times.
Alerts are fully optional and can be toggled on or off.
This indicator identifies when two consecutive candles of the same color appear on the chart—bullish (green) or bearish (red). It highlights the second candle of the streak and optionally triggers an alert, helping traders spot short-term momentum shifts or continuation patterns.
🔹 How It Works:
Candle Detection: The script checks the last three candles.
The second candle in a pair is marked only if it follows a candle of the same color and is not part of a longer streak.
Marking:
Bullish second candles are marked with a green triangle below the bar.
Bearish second candles are marked with a red triangle above the bar.
Alerts (Optional):
Traders can enable or disable alerts independently for bullish or bearish setups using checkboxes in the settings.
Alerts are triggered only on the second candle of a two-candle streak.
🔹 Inputs / Settings:
Enable Bullish Candle Alerts ✅
Enable Bearish Candle Alerts ✅
🔹 Use Case:
Identify short-term trend momentum.
Spot potential continuation setups after two consecutive candles of the same type.
Combine with other indicators for confirmation (e.g., support/resistance, moving averages).
🔹 Notes:
The indicator marks only the second candle in a two-candle streak to avoid marking longer streaks multiple times.
Alerts are fully optional and can be toggled on or off.
Open-source Skript
Ganz im Sinne von TradingView hat dieser Autor sein/ihr Script als Open-Source veröffentlicht. Auf diese Weise können nun auch andere Trader das Script rezensieren und die Funktionalität überprüfen. Vielen Dank an den Autor! Sie können das Script kostenlos verwenden, aber eine Wiederveröffentlichung des Codes unterliegt unseren Hausregeln.
Haftungsausschluss
Die Informationen und Veröffentlichungen sind nicht als Finanz-, Anlage-, Handels- oder andere Arten von Ratschlägen oder Empfehlungen gedacht, die von TradingView bereitgestellt oder gebilligt werden, und stellen diese nicht dar. Lesen Sie mehr in den Nutzungsbedingungen.
Open-source Skript
Ganz im Sinne von TradingView hat dieser Autor sein/ihr Script als Open-Source veröffentlicht. Auf diese Weise können nun auch andere Trader das Script rezensieren und die Funktionalität überprüfen. Vielen Dank an den Autor! Sie können das Script kostenlos verwenden, aber eine Wiederveröffentlichung des Codes unterliegt unseren Hausregeln.
Haftungsausschluss
Die Informationen und Veröffentlichungen sind nicht als Finanz-, Anlage-, Handels- oder andere Arten von Ratschlägen oder Empfehlungen gedacht, die von TradingView bereitgestellt oder gebilligt werden, und stellen diese nicht dar. Lesen Sie mehr in den Nutzungsbedingungen.