I have made the Keltner channel more flexible, in order to adapt it for use with non-standard bars.
First of all, the original KC is like this:
KeltnerChannel = Average( Price, Length ) + NumATRs * AvgTrueRange( Length ) ;
where the NumATRs is either +1.5 for the upper band and -1.5 for the lower band.
It has SMA and then ATR as the volatility measure.
I have loosened both:
1. The MA is made choosable between SMA and EMA:
if MA=0 then
var0 = XAverage (Price,Length ) //this is the EMA
else
var0 = AverageFC(Price,Length ) ;
2. The ATR is chosen as either original ATR, or an Average Price range, i.e. High-Low. The latter is the relevant measure when you use Range bars or Renko bars, because then the ATR is constant. Replace the original ATR with AverageFC2 on APR:
AverageFC2(AvgPriceRange,Length);
(I'm btw. using a version with HeikenAshi bars for APR)