全職奶爸

Keltner Channels: Formula, TradingView Settings and Squeeze Examples

Keltner Channels: formula, settings and squeeze examples

Keltner Channels place a moving average between two bands whose distance is based on a range measure. A common modern setup uses a 20-period exponential moving average, a 10-period Average True Range, and bands two ATRs above and below the average. The center describes the recent price trend; the distance describes recent volatility.

A close above the upper band can occur in a strong uptrend. The same location, inside an established trading range, can attract a completely different trade idea. Reading the channel starts with choosing which of those conditions your strategy is designed to trade.

Write down the complete settings before comparing charts. “20 and 2” leaves out the ATR length, range calculation, price source and timeframe. Two traders can enter those two numbers and still see different bands.

Keltner Channel formula: basis, ATR and multiplier

For the modern EMA-and-ATR version, calculate the basis from the selected price series. Calculate ATR separately from the bars' true ranges. Add the chosen multiple of ATR to obtain the upper band, then subtract that same distance to obtain the lower band.

Basis = EMA of the selected price over N bars.
Upper band = Basis + multiplier × ATR.
Lower band = Basis − multiplier × ATR.

The basis length and ATR length are separate inputs. A 20-period EMA can sit between bands calculated from ATR(10). It can also sit between bands calculated from ATR(20). The center can be identical while the upper and lower values differ.

Suppose the EMA is 29,500, ATR is 40 points, and the multiplier is 2. The offset on each side is 80 points. The upper band is 29,580 and the lower band is 29,420. The entire channel is 160 points wide. Multiplying ATR by two gives the distance from the center to one band; it does not give the full width.

Each band is two ATRs from the basisHypothetical EMA29500, ATR40, multiplier2. Lower29420,upper29580. Each offset80points; full width160points equals4ATR.Each band is two ATRs from the basisHYPOTHETICAL · EMA 29,500 · ATR 40 · Multiplier 2Lower 29,420EMA 29,500Upper 29,58080 points = 2 ATR80 points = 2 ATRFull width = 29,580 − 29,420 = 160 points2 × multiplier × ATR = 2 × 2 × 40 = 160The multiplier describes one side; full width includes both sides.

If ATR increases to 60 while the basis remains 29,500, the bands become 29,620 and 29,380. The full width becomes 240 points. These hypothetical calculations hold the basis still to isolate the effect of changing ATR. A live chart normally updates the basis and range together as new data arrives.

The TradingView KC manual describes this modern calculation and its configurable inputs. The original Keltner construction used a typical-price moving average and averaged high-low ranges. Those versions belong to the same indicator family, but their outputs are not interchangeable.

True range includes gaps that high minus low misses

True range is the largest of the current high minus low, the absolute difference between high and previous close, and the absolute difference between low and previous close. The previous close matters because the market can move between bars without trading through the whole interval inside the new bar.

Take a hypothetical previous close of 100 and a new bar with a high of 110 and a low of 108. High minus low is only 2. The high is 10 points above the previous close, so true range is 10. A width calculation using only high-low range sees a much smaller observation than an ATR calculation.

ATR smooths a sequence of true ranges. With Wilder's smoothing, the next value equals the previous ATR plus one divided by the length, multiplied by the difference between the new true range and previous ATR. The averaging choice is part of the definition: an EMA-smoothed range and a Wilder-smoothed range can respond differently even when their length labels match.

To isolate that response, assume both previous ATR values are 2 and the next true range is 10. Wilder ATR(10) updates to 2.8: 2 + (10−2)/10. Wilder ATR(20) updates to 2.4. This example deliberately gives both series the same previous value; it does not assume that their historical readings are always equal.

The basis updates separately. If the previous EMA(20) is 100 and the new close is 110, its next value is approximately 100.9524, using an EMA weight of 2/21. With a multiplier of 2, the ATR(10) example produces bands near 106.5524 and 95.3524. ATR(20) produces bands near 105.7524 and 96.1524. That is a visible difference created by one input.

The Average True Range guide works through smoothing, timeframe and stop-distance examples in more detail. Match the selected channel implementation before reproducing its values in a spreadsheet.

TradingView Keltner Channels settings

Open Indicators, search for Keltner Channels, and select the built-in indicator. Open its settings beside the indicator name. Community scripts can add different smoothing, multiple envelopes or entry markers; their title alone does not establish that they match the built-in tool.

InputBaselineWhat it controls
Length20Number of bars used for the basis
Multiplier2Distance from the basis to each band
SourceClosePrice series used for the basis
Use Exponential MAOnEMA basis rather than SMA
Bands StyleAverage True RangeRange measure used for the offset
ATR Length10Separate lookback for ATR
TimeframeChartCalculation follows the chart timeframe
Wait for timeframe closesRelevant to higher-timeframe calculationsWhether higher-timeframe values wait for that bar's close

The current official Inputs image shows the 20-period basis and ATR Length 10 separately. A setup using ATR Length 20 is a different configuration, even if its status line displays the same basis length and multiplier. Record the input labels with the numbers so the setup remains reproducible.

TradingView KC Inputs: Length 20, Multiplier 2, Close, exponential MA checked, ATR Length 10 and chart timeframe
The basis Length and ATR Length are separate fields. Open the settings image at full size.

Changing Source from Close to a midpoint or typical price changes the basis series. Turning off Use Exponential MA changes the averaging method. Selecting a different Bands Style changes the range calculation. These are mathematical changes, not cosmetic preferences.

Length 20 means 20 bars of the calculation timeframe. On a five-minute calculation it uses five-minute observations; on a daily calculation it uses daily observations. A one-hour indicator displayed on a five-minute chart still works from hourly data. It does not become a five-minute indicator merely because more candles are visible underneath.

Use the TradingView indicators guide to organize a chart around a few distinct jobs. For this setup, keep the basis, both outer bands and a light fill visible. Choose colors that let you distinguish an outside close without covering the candle bodies.

Why two platforms can show different channels

Start with the symbol, feed, bar interval and session. A chart including overnight futures bars has a different sequence of observations from one limited to regular trading hours. Continuous-contract adjustments and the amount of history loaded can also affect the input series or the early values of a recursive average.

Then compare the basis method, source, basis length, range style, ATR length and range smoothing. The thinkorswim KeltnerChannels reference, for example, exposes a true-range average type separately from the basis average type. Matching a factor of 2 does not match those choices automatically.

Compare the indicator's numeric values on the same completed bar after aligning the inputs. Screen appearance alone can mislead when price scales differ. Give recursive calculations sufficient prior history, and distinguish a small initialization difference from a persistent difference caused by a different formula.

Keltner Channel trading strategies need a defined market state

A trend-following setup looks for the basis to slope in the trade direction and price to hold mainly on that side of it. A range strategy looks for established boundaries and repeated two-way movement. A flat basis is one observation; it does not prove that a fresh breakout will fail.

Choose the interpretation before the trigger. If your rule buys a close above the upper band, that trade cannot become a range short after the next candle reverses. Give the breakout its own invalidation and log the failed setup. Otherwise the apparent flexibility hides a strategy that changes with hindsight.

For a hypothetical trend pullback, suppose the basis has been rising and price returns toward it after an upward leg. A testable rule might require a completed candle to reclaim the basis, then enter only after that candle's high is exceeded. Put the planned stop below the pullback structure and calculate the quantity from that distance.

That is an example rule for testing, not a claim that every basis touch deserves an entry. If the pullback breaks the structure you intended to defend, the setup has failed. A later rise in the EMA does not retroactively make the earlier entry available at a better price.

A breakout close and an executable entry are different events

A breakout rule can require a completed close outside the upper band, a basis rising over a defined number of bars, and a break of an established price range. Specify the lookbacks and thresholds in advance. Words such as “strong,” “clear” and “decisive” need an observable definition if they determine whether a trade enters the test.

If the close creates the signal, the final close is known only when that candle finishes. A backtest cannot assume that a trade received an earlier intrabar price solely because the finished candle later qualified. Model the next available entry, any stop or limit instruction, and the execution cost that the intended trading method can support.

For a failed-breakout example, price closes above the upper band, then returns inside and breaks the signal candle's low. A strategy using that low as invalidation exits according to its planned order. The channel might still slope upward, but its slope does not cancel the trade's stop rule.

For a range fade, require a range that existed before the entry and a defined rejection or return-inside event. A short near the upper edge can be invalidated by a break above the range. Decide whether the first target is the basis, a fixed price level or an opposite-range boundary; those exits produce different results.

Keltner Channel vs Bollinger Bands: check both boundaries

Keltner width in the modern ATR version measures recent true ranges. Standard Bollinger width measures dispersion of the selected prices around their average. They answer different questions. Neither measure has to expand or contract by the same amount after a gap, an unusually large bar or an old observation leaving its lookback window. The Donchian Channels guide compares this range measure with rolling price extremes and shows why a close-based breakout uses the prior completed boundary.

The Bollinger Bands guide explains its standard-deviation calculation, %B and BandWidth. When combining the two channels, record the basis methods and lengths as well as both width calculations. Matching “20 and 2” on each does not give them identical centers or offsets.

A common two-channel squeeze condition requires the upper Bollinger Band below the upper Keltner band and the lower Bollinger Band above the lower Keltner band. Both comparisons must be true on the same observation. A smaller Bollinger width by itself is insufficient when the two centers differ.

Narrower bands can still sit outsideHypothetical Keltner96to104 width8, Bollinger99to105 width6, upperoutside. ContainedexampleBollinger98.5to103.5. Checkbothboundaries, notwidthalone.Narrower bands can still sit outsideHYPOTHETICAL · KC basis 100 · KC bounds 96 and 104BB basis 102 · Half-width 3BB lower 99 · BB upper 105 → upper is outside KCBB width 6 is less than KC width 8; containment is false.BB basis 101 · Half-width 2.5BB lower 98.5 · BB upper 103.5 → both inside KCCheck upper BB < upper KC AND lower BB > lower KC.Containment describes relative volatility; it does not choose direction.

Suppose Keltner is centered at 100 with a half-width of 4: its boundaries are 96 and 104. Bollinger is centered at 102 with a half-width of 3: its boundaries are 99 and 105. Bollinger's full width is 6, smaller than Keltner's 8. Yet its upper band is outside Keltner, so this is not complete containment.

Now set the Bollinger center to 101 and half-width to 2.5. Its boundaries are 98.5 and 103.5, both inside 96 and 104. For symmetric bands, an equivalent strict test is: the absolute difference between the centers, plus Bollinger half-width, is less than Keltner half-width. If a boundary touches exactly, follow the script's stated strict or inclusive comparison.

Containment identifies one relative-volatility condition. It does not identify a breakout direction, promise a particular move size or set the time of release. A squeeze can end, reappear, or resolve into a failed breakout. Keep a separate directional trigger and invalidation rule.

Choosing settings for scalping or day trading

A shorter basis uses a more recent sample and reacts more quickly to new prices. A shorter ATR length gives recent true ranges more weight under the same smoothing convention. A smaller multiplier moves the bands closer to the basis for a given ATR. Each adjustment changes the events your strategy will observe.

Those mechanical effects do not identify a universally best setting for a one-minute or five-minute chart. A configuration that generates many small entries may look active while losing its advantage to commissions, spread and adverse fills. Another configuration may produce fewer trades but leave too small a sample to judge.

Keep a baseline, then change one input for a stated reason. For example, compare ATR Length 10 with 20 while holding the basis, multiplier, session and entry rule fixed. Split development data from validation data. Judge net results, losing streaks and drawdown as well as win rate; a higher win rate can coexist with worse losses.

RSI, MACD or ADX can define additional conditions, but adding a second indicator does not make the evidence independent. Test the added rule against the same baseline after costs. Keep it only when the comparison supports the decision you intended it to improve.

Plan risk from the stop before choosing quantity

The outer band is a moving reference. ATR can rise after entry, placing the band further away. If the trade was planned around a specific invalidation level, moving the stop outward to follow the expanding band increases the original loss allowance. A trailing rule needs to state when it updates and whether it can loosen.

Start with the entry and invalidation prices. Convert their distance into the instrument's currency value per unit, then include planned fees and an adverse-execution allowance. For whole-contract products, round quantity down to the permitted step. A zero-contract result means the minimum quantity exceeds that budget under those assumptions.

The position sizing calculator guide explains this calculation and the difference between distance and money risk. Channel width can help describe the environment, but the actual distance from entry to the chosen stop determines the starting price risk.

Also define the session's total loss allowance. Several failed breakouts can consume it even when each trade follows its individual stop. Record open positions and correlated exposure together; a second entry in the same move can add risk rather than diversify it.

Write the target rule beside the stop rule. If a moving upper band is the target, its distance can change after entry, so the reward shown by the final chart may differ from what was available when the trade began. The risk-reward ratio guide separates planned reward, realized outcome and the win rate a particular payoff structure would require. Use those quantities to evaluate the complete setup.

For a prop firm evaluation, keep the trade plan inside the applicable loss rules and available room. A channel does not change the firm's monitoring method, payout conditions or permitted size. Compare the plan's rules before paying an evaluation fee.

Compare HDP discounts

Lucid 30% · Tradeify 30% · TPT 50%.

See current offers ↗

Eligible partner plans only.

Keep a Keltner strategy test reproducible

Save the symbol, feed, session, chart type, calculation timeframe and every indicator input with the entry and exit rules. Note whether the signal uses an intrabar cross or a completed close. For a higher-timeframe indicator, record when that higher bar becomes confirmed and when its information becomes usable on the execution chart.

Keep the event price separate from the assumed fill price. A candle touching a limit price does not establish that every order filled, and a volatile breakout can create a difference between intended and actual entry. Include the assumptions in the test rather than correcting only the losing examples afterward.

Measure the range of outcomes across different market periods. A channel-based fade can work through a quiet range and suffer when a persistent trend begins. A breakout method can encounter repeated false starts. Grouping those conditions helps explain where the rule behaves differently without selecting only attractive screenshots.

The useful end product is a setup another person could calculate and test with the same inputs. A specific channel definition, a signal available at a known time, and a planned invalidation make the chart actionable enough to evaluate. The colored envelope by itself does not do that work.

Keltner Channels FAQ

What is a Keltner Channel?

It is a moving-average basis with upper and lower range-based bands. A common modern version uses an EMA with bands a multiple of ATR above and below it.

What is the Keltner Channel formula?

For the modern ATR version, upper band equals basis plus multiplier times ATR; lower band equals basis minus that distance. Record the basis method and length separately from the ATR length and smoothing.

What are the TradingView Keltner Channels default settings?

The current official Inputs image shows Length 20, Multiplier 2, Close, Use Exponential MA enabled, ATR Length 10 and the chart timeframe. Check the actual Inputs when using a different script or saved template.

Does 20 and 2 fully describe the settings?

No. It leaves out the ATR length, range style, source, averaging methods and calculation timeframe. Those choices can change the bands while the basis length and multiplier remain the same.

How wide is a channel with a multiplier of 2?

For the symmetric ATR version, each band is two ATRs from the basis, so the full distance between the bands is four ATRs. With ATR 40, the full width is 160 points.

Is Keltner Channel better than Bollinger Bands?

Neither is universally better. Modern Keltner width uses true range, while standard Bollinger width uses price dispersion. Compare their behavior under matched settings and a defined strategy after costs.

What is the Bollinger and Keltner squeeze?

A common definition requires both Bollinger bands inside the corresponding Keltner boundaries. Smaller total Bollinger width alone does not prove containment when the centers differ.

Does a squeeze predict the breakout direction?

No. It describes a relative-volatility condition. Direction, entry timing, invalidation and execution require separate rules, and a breakout after a squeeze can fail.

Should I sell every upper-band touch?

An upper-band touch can occur during a sustained uptrend. A range fade requires its own market-state, confirmation and invalidation rules; the touch alone is not a complete sell setup.

What are the best Keltner Channel settings for scalping?

There is no universal optimum. Test a recorded baseline for the intended symbol, session, timeframe and execution costs, then validate changes on separate data.

Why do my Keltner Channels differ between platforms?

Compare symbol, session, source, basis average, lengths, range style and ATR smoothing. Also align the calculation timeframe and loaded history before comparing completed-bar values.

Do Keltner Channels repaint?

Current-bar values can change as price and range develop. Higher-timeframe values can remain unconfirmed until that higher bar closes. Record whether the rule uses developing or confirmed observations.

Do two-ATR bands contain 95% of prices?

The formula does not establish a universal 95% containment rate. ATR is a range measure, and the fraction of observations inside the channel depends on the data and settings.

Can I use the outer band as a stop-loss?

Only as part of a defined rule that specifies timing and updates. A widening band can increase the distance from entry, so calculate quantity from the planned invalidation and control any later change in risk.