OPEN-SOURCE SCRIPT
Candle Streak Scanner + Visual Highlight

The Candle Streak Scanner identifies and highlights consecutive bullish or bearish candle streaks within a user-defined lookback period. Users can specify a minimum and maximum streak length, and the indicator will automatically highlight any qualifying streaks on the chart—green for bullish streaks and red for bearish streaks. Each highlighted streak displays its length directly on the chart, while a table in the top-right shows the current lookback window, the maximum streak detected, and the total number of streaks that fall within the selected range. Both the streak labels and the table text can be switched between black or white for better visibility on different chart themes.
Strategies & Use Cases
Candle streaks often reflect short-term momentum or exhaustion in price movement. Traders can use this indicator to quickly identify periods where price has moved strongly in one direction for several candles in a row. Such streaks may signal either continuation (momentum trading) or potential reversal zones (mean-reversion setups). For example, traders may look for long bullish streaks as signs of strong buying pressure, or watch for extended streaks that exceed typical ranges as potential exhaustion points before pullbacks.
How It’s Used
Set the lookback period to define how many recent candles the indicator should analyze. Then choose the minimum and maximum streak length you want to detect (e.g., 3 to 8 candles). The indicator will automatically highlight all qualifying streaks within that range and display their length directly on the chart. The table provides a quick summary of the largest streak and how many streaks occurred in the selected range, helping traders gauge current momentum conditions at a glance.
Strategies & Use Cases
Candle streaks often reflect short-term momentum or exhaustion in price movement. Traders can use this indicator to quickly identify periods where price has moved strongly in one direction for several candles in a row. Such streaks may signal either continuation (momentum trading) or potential reversal zones (mean-reversion setups). For example, traders may look for long bullish streaks as signs of strong buying pressure, or watch for extended streaks that exceed typical ranges as potential exhaustion points before pullbacks.
How It’s Used
Set the lookback period to define how many recent candles the indicator should analyze. Then choose the minimum and maximum streak length you want to detect (e.g., 3 to 8 candles). The indicator will automatically highlight all qualifying streaks within that range and display their length directly on the chart. The table provides a quick summary of the largest streak and how many streaks occurred in the selected range, helping traders gauge current momentum conditions at a glance.
نص برمجي مفتوح المصدر
بروح TradingView الحقيقية، قام مبتكر هذا النص البرمجي بجعله مفتوح المصدر، بحيث يمكن للمتداولين مراجعة وظائفه والتحقق منها. شكرا للمؤلف! بينما يمكنك استخدامه مجانًا، تذكر أن إعادة نشر الكود يخضع لقواعد الموقع الخاصة بنا.
إخلاء المسؤولية
لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.
نص برمجي مفتوح المصدر
بروح TradingView الحقيقية، قام مبتكر هذا النص البرمجي بجعله مفتوح المصدر، بحيث يمكن للمتداولين مراجعة وظائفه والتحقق منها. شكرا للمؤلف! بينما يمكنك استخدامه مجانًا، تذكر أن إعادة نشر الكود يخضع لقواعد الموقع الخاصة بنا.
إخلاء المسؤولية
لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.