"Keltner Channel indicator is based on volatility using a pair of values placed as an "envelope" around the data field. Values are calculated by taking the Exponential Moving Average of the data and adding or subtracting the average true range multiplied by an offset value from the moving average."
I opened the source code. It's using SMA, not EMA.
protected override void OnBarUpdate()
{
diff.Set(High[0] - Low[0]);
double middle = SMA(Typical, Period)[0];
double offset = SMA(diff, Period)[0] * offsetMultiplier;
double upper = middle + offset;
double lower = middle - offset;
Midline.Set(middle);
Upper.Set(upper);
Lower.Set(lower);
}
Comment