If UpTicks > DownTicks
Bar = CCI * (UpTicks - DownTicks)/(UpTick + DownTicks)//plots blue bar above zero line
If UpTicks < DownTicks
Bar = CCI * (DownTicks - UpTicks)/(UpTick + DownTicks)*(-1)//plots red bar below zero line
If UpTicks = DownTicks
Bar = 0.
Since CCI measures momentum to either side, this indicator would start to show when an uptrend (downtrend) is getting weak.
Any help would be greatly appreciated.
Thanks,
Comment