RagingRocketBull

Bars In a Row Counter Pro by RRB

Bars In a Row Counter Pro by RagingRocketBull 2018
Version 1.0

This indicator counts bars of the same color in a sequence (dojis included) and plots the resulting counts as histogram bars

1. based on barssince, uses plot function with histogram style
2. Min/Max Threshold is the upper and lower limits for counting bars. For example, you can look only for sequences of 5 to 10 bars of the same color in a row
3. Show Histogram Beyond Threshold - you can hide/change color of the non-important histogram part that exceeds the threshold
4. Show Threshold Bands - show the upper and lower limits as levels on the indicator
5. Show Min/Max Bands - show ATH max red/green bars in a row historic levels on the indicator
6. Count Red Bars - count red bars in a sequence, show/hide red bars on a histogram (you can exclude red bars and count only green bars)
7. Count Green Bars - count green bars in a sequence, show/hide green bars on a histogram (you can exclude green bars and count only red bars)
8. Invert Red Bars - show red and green histograms together on the same axis above zero (saves space)


Feel free to use. Good Luck!
Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in a publication is governed by House Rules. You can favorite it to use it on a chart.

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.

Want to use this script on a chart?