DRodriguezFX

Consecutive Candle Count

Adaptation of www.fxcmapps.com/tra...on/consecutive-bars/ from FXCM's Marketscope
Coded by David Rodriguez, Quantitative Strategist for DailyFX.com

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?
study("Consecutive Candle Count")
barup = close > close[1]
bardown = close < close[1]
plot(series=barssince(barup)*-1, title="Consecutive Bars Down", color=red, style=histogram, linewidth=2)
plot(series=barssince(bardown), title="Consecutive Bars Up", color=green, style=histogram, linewidth=2)
//Adaptation of http://www.fxcmapps.com/trading-station/consecutive-bars/ from FXCM's Marketscope
//Coded by David Rodriguez, Quantitative Strategist for DailyFX.com