
//@version=2
study("C Bunny G",overlay=true)
isHigherHigh() => high>high[1] and high[1]>high[2] and close>close[1] and close[1]>close[2] and close>open and close[1]>open[1] and close[2]>open[2] and low>open[1] and low[1]>open[2] and (open+low)<(open+close)
barcolor(isHigherHigh()? blue :na)
barcolor(isHigherHigh()? blue :na, -1)
barcolor((isHigherHigh() and close>open)? blue :na, -2)
isLowerLow() => low<low[1] and low[1]<low[2] and close<close[1] and close[1]<close[2] and close<open and close[1]<open[1] and close[2]<open[2] and high<open[1] and high[1]<open[2]
barcolor(isLowerLow()? red :na)
barcolor(isLowerLow()? red :na, -1)
barcolor((isLowerLow() and close<open)? red :na, -2)