OPEN-SOURCE SCRIPT

Counting Positive and Negative Bars

839
Counting Positive and Negative Bars: It goes through a specified number of bars and counts how many are positive (close above the previous value) and how many are negative (close below the previous value).

Imbalance Criterion: If the count of negative bars exceeds that of positive bars by a configurable margin (such as 60%), it signals a possible buy (Long) condition. The opposite applies for sell (Short) conditions..

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.