OPEN-SOURCE SCRIPT

Consecutive Candle Counter

191
Consecutive Condition Counter is a versatile indicator that tracks and visualizes consecutive candles based on user-defined market conditions. It helps traders quickly identify streaks of bullish or bearish signals by counting how many bars in a row satisfy the selected condition.

🔍 Features:

Three selectable conditions via a dropdown:

Up & Down Days: Counts consecutive up or down candles. Each up candle adds +1, each down candle subtracts -1. The counter resets when direction changes.

RSI Signal: Counts how many consecutive bars RSI remains above 70 (+1 per bar) or below 30 (-1 per bar). Resets when RSI moves back to the neutral zone.

SMA Positioning: Counts consecutive bars where price stays above (+1) or below (-1) a Simple Moving Average (SMA). SMA period is user-defined.

📊 Visualization:

Positive streaks are shown in green, negative streaks in red, and neutral values in gray.

Displayed as a histogram below the chart for quick pattern recognition.

⚙️ Inputs:

Choose condition logic from the dropdown.

Configure the RSI period and SMA period as needed.

This tool can be helpful for identifying momentum streaks, overbought/oversold trends, or trend-following behavior in a visually intuitive way.

Feragatname

Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, işlem veya diğer türden tavsiye veya tavsiyeler anlamına gelmez ve teşkil etmez. Kullanım Şartları'nda daha fazlasını okuyun.