Keltner Channel

The Keltner Channel is a moving average with a volatility band built from the Average True Range: MA ± deviation · ATR.

Role in the strategy

SlotAvailableRole
Entry PointYesEnters at the upper or lower band.
Entry RuleYesFilters entries by the bar open or the bar close relative to the bands.
Exit PointYesExits at the upper or lower band.
Exit RuleYesTriggers exits by the bar open or close position relative to the bands.

As a point indicator the bands are the pending order levels; as a rule the indicator filters entries (AND) or triggers exits (OR). See Indicators for the slot semantics.

As an exit point it places resting orders the bar reaches, so it allows no exit rules: Exit Rules are available only behind Bar Open or Bar Close.

Logic rules

  • Entry Point: Enter long at Upper Band, Enter long at Lower Band.
  • Exit Point: Exit long at Upper Band, Exit long at Lower Band.
  • Rule slots:
RuleLong order priceShort order price
Enter/Exit long at Upper BandUpper BandLower Band
Enter/Exit long at Lower BandLower BandUpper Band
  • Entry Rule / Exit Rule:
RuleLong signal is 1 whenShort signal is 1 when
The bar opens above Upper Bandbar open is above the upper bandbar open is below the lower band
The bar opens below Lower Bandbar open is below the lower bandbar open is above the upper band
The bar opens below Upper Band after opening above itbar open fell back below the upper bandbar open rose back above the lower band
The bar opens above Upper Band after opening below itbar open rose above the upper bandbar open fell below the lower band
The bar opens below Lower Band after opening above itbar open fell below the lower bandbar open rose above the upper band
The bar opens above Lower Band after opening below itbar open rose above the lower bandbar open fell below the upper band
The bar closes above Upper Bandbar close is above the upper bandbar close is below the lower band
The bar closes below Lower Bandbar close is below the lower bandbar close is above the upper band
The bar closes below Upper Band after closing above itbar close fell back below the upper bandbar close rose back above the lower band
The bar closes above Upper Band after closing below itbar close rose above the upper bandbar close fell below the lower band
The bar closes below Lower Band after closing above itbar close fell below the lower bandbar close rose above the upper band
The bar closes above Lower Band after closing below itbar close rose above the lower bandbar close fell below the upper band

The six The bar closes rules are exit-only (Exit Rules): they compare the close of the bar the rule reads with the band of that same bar.

No band-open pin is needed: the band is computed from a moving average, so the bar open of the judged bar can sit outside it — the same rule as Bollinger Bands, unlike Donchian's channel that contains its own bar.

Parameters

ParameterTypeDefaultRangePurpose
MA methodselectSimpleSimple, Exponential, Weighted, SmoothedMethod of the moving average
Periodnumber202 to 1000Bars of the moving average
ATR periodnumber102 to 1000Bars of the Average True Range that sets the width
Deviationnumber21 to 5ATR multiplier of the band

Calculation

  1. The moving average of the close is computed with the selected method (tech.movingAverage).
  1. The Average True Range over the ATR period is computed (tech.ATR, an incremental simple average of True Range, which is what MetaTrader's iATR returns).
  1. Upper Band = MA + Deviation · ATR and Lower Band = MA − Deviation · ATR; both lines are drawn on the main price chart.

Close is pinned: the band width is an ATR of the bar being judged, and an applied price of Open would let the line read a bar whose high and low are still unknown.

Backtesting

  • As an entry point the pending orders sit at the two band levels; the levels differ, so both orders can be placed and the intrabar interpolation decides which side fills first.
  • As a rule the indicator contributes only the long/short signal arrays. Comparisons use the standard dead zone (SIGMA = 0.000001).
  • A level the price gapped across moves to the bar open, so an order is never missed on a gap.