Consecutive Candlesticks

 
mixtermind wrote >>
Is there a way to calculate the number of identical candlesticks(green=long,red=short)?

yes, there is a way, and here is a crude way

if (Open[1]<Close[1]) it is long

else it is short

repeat this for other candlesticks ie Open[2]/Close[2], Open[3]/Close[3],....,Open[n]/Close[n]

 
ronaldosim:

yes, there is a way, and here is a crude way

if (Open[1]<Close[1]) it is long

else it is short

repeat this for other candlesticks ie Open[2]/Close[2], Open[3]/Close[3],....,Open[n]/Close[n]

Thanks, that works great. I originally had bar=Open[1]-Close[1] and compared totals, but this way is easier.