OPEN-SOURCE SCRIPT

Consecutive Candle Counter

157
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提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。