OPEN-SOURCE SCRIPT

Consecutive Candle Counter

412
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.

면책사항

이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.