QuantsappFaster in the app: live data, alerts, tradingOpen
Log inStart free
Open Backtesting →
Futures · technicalPositionalNIFTYlow complexity

Keltner breakout, mid-band exit

This NIFTY futures system trades breakouts from a Keltner channel on 15-minute candles, but only in the direction of the 200-candle EMA. A fresh close outside the channel opens the trade; a close back through the channel's middle line closes it. Trades can last minutes or several days. The idea is to join a move that has pushed beyond normal volatility while the bigger trend agrees.
Trades a fresh 15-minute close outside a Keltner channel on NIFTY futures, only on the side of the 200 EMA, and exits on a close back through the middle line.
Market viewEither direction (follows the move)
TradesNIFTY near-month futures, 1 lot, held overnight
RiskOpen-ended (loss not capped by the structure)
CapitalFutures margin
SuitsIntermediate
Trades a month11.1
Typical hold20.5 hours
Profitable months7 of 12
Longest losing run13 trades
Made money inNIFTY moving over 1% while the trade is heldTrend days that close near the high or lowCalm markets with India VIX below 11.5
Lost money inChoppy days that close mid-rangeNIFTY staying within ±1% while heldGap-up openings
Default settings
Symbol
Bar minutes
Kc EMA
Kc ATR
Kc ATR mult
Trend filter
Trend EMA
Exit mode
Mode
Last entry
Exit time
Roll time
Lots
Backtest this strategy →Change any setting, pick your own period and run it in the Quantsapp web app. Backtesting is part of the Max plan. Pro+ members can use it now as a free trial.
1

How it trades

What it trades
Universe
NIFTY Positional · 1 Oct 25 → 30 Sep 26
Enters
First tick after a fresh 15-minute close outside the channel on the 200 EMA's side
Legs
BUY FUT · Near month, close above upper Keltner band and 200 EMA · Current month, rolled at expiry · 1 lotSELL FUT · Near month, close below lower Keltner band and 200 EMA · Current month, rolled at expiry · 1 lot
Exits
signal 15-minute close back through the 20 EMA middle lineroll closed 15:15 on futures expiry, reopened next month
Re-entry
Next fresh breakout once flat
Bars
BAR_MINUTES bars of the rolled near-month future, anchored at 09:15, continuous across sessions.
Channel
middle = EMA(KC_EMA) of the closes; upper / lower = middle +/- KC_ATR_MULT x ATR(KC_ATR) (Wilder).
Entry
a bar closes above the upper band (the previous close was not above it) and, with TREND_FILTER on, above EMA(TREND_EMA) -> buy LOTS at the first tick after that bar; a fresh close below the lower band (and below the EMA) -> sell. One position at a time.
Exit
EXIT_MODE "midband" - a bar closes back through the middle band (below it for a long) -> out at the next tick. EXIT_MODE "opposite" - out only on a close beyond the opposite band. A bar that exits may open the other side at the same tick when its own entry rule holds. MODE "intraday": entries up to LAST_ENTRY and everything squared off at EXIT_TIME.
Roll
positional - on the futures expiry day the position is closed at ROLL_TIME ("monthly roll") and the same side re-opened on the new near month at the next session's first tick.
End
closed at the last tick of the test window.
2

Results

PRE-BUILT · DEFAULTS
NIFTY · 2025-10-01 → 2026-09-30 · 133 trades · before costs
Net P&L+₹47,519
Win rate40%
Max drawdown−₹98,885
Avg per trade+₹357
Profit factor1.11
Worst trade−₹34,066
3

Where it made and lost money

In this test the breakout paid when a real move followed. Trades during which NIFTY fell more than 1% made +₹2,67,655 over 23 trades with an 83% win rate, and entries on 49 trend days made ₹2,52,170. Entries on 34 choppy days lost ₹1,54,527 with a 21% win rate: price closes outside the channel, then falls back through the 20 EMA, triggering the exit at a loss. Trades with NIFTY within ±1% while held lost ₹52,293. Calm evenings with India VIX below 11.5 made ₹80,018 over 33 trades, while gap-up openings lost ₹37,748 over 25. Friday entries made ₹1,35,347, a pattern one year cannot confirm.

Kind of session on the entry day
Quiet session (range under 0.75%)−₹48,95349 trades37% won
Trend day (closed near the high or low)+₹2,52,17049 trades57% won
Choppy day (wide range, closed mid-range)−₹1,54,52734 trades21% won
Session direction on the entry day
NIFTY closed above its open−₹1,73,24660 trades30% won
NIFTY closed below its open+₹2,21,93572 trades49% won
Market while the trade was held
NIFTY rose over 1% while held+₹49,30414 trades71% won
NIFTY within ±1% while held−₹52,29338 trades42% won
NIFTY fell over 1% while held+₹2,67,65523 trades83% won
Day of the week
Monday−₹7,82231 trades35% won
Tuesday−₹12,18321 trades48% won
Wednesday−₹41,85132 trades38% won
Thursday−₹24,65919 trades37% won
Friday+₹1,35,34728 trades46% won
India VIX the evening before
VIX below 11.5 (calm)+₹80,01833 trades48% won
VIX 11.5-14.5 (normal)−₹35,24260 trades42% won
VIX above 14.5 (nervous)+₹3,91339 trades31% won
How the entry day opened
Gap up of 0.4% or more−₹37,74825 trades36% won
Flat open+₹55,25082 trades43% won
Gap down of 0.4% or more+₹31,18725 trades36% won
Expiry day (NIFTY weekly)
Expiry day−₹18,03322 trades45% won
Other days+₹66,722110 trades39% won
Trend going in
Uptrend (NIFTY above its 20-day average)+₹12,91169 trades39% won
Downtrend (NIFTY below its 20-day average)+₹35,77963 trades41% won
The same trades, split by the market conditions around each entry, before costs.
4

About this strategy

  1. Build 15-minute candles of the near-month NIFTY future on a roll-adjusted series.
  2. Draw a Keltner channel: a 20-period EMA as the middle line, with bands 2 × ATR(10) above and below.
  3. Go long when a candle closes above the upper band for the first time and also above the 200-period EMA; go short on a fresh close below the lower band that is also below the 200 EMA.
  4. Fill at the first futures tick after the signal candle closes; only one position is held at a time.
  5. Exit when a candle closes back through the middle line (below it for a long, above it for a short).
  6. Positions are held overnight; on futures expiry day they are closed at 15:15 and reopened in the next month at the next open.

Why traders use it

A Keltner channel scales with ATR, so a close outside it marks a move that is large for current conditions rather than in absolute points. The 200 EMA keeps the system from fighting the larger trend, cutting counter-trend breakouts that often fail. Exiting at the middle line gives back part of the move but gets out once momentum fades, which keeps the logic simple: in on strength, out when price returns to its average.

Works best whenDirectional phases where a breakout is followed by a move of more than 1%, especially trend days that close near their extremes and calm periods when India VIX is below 11.5, so the channel is narrow and a close outside it is meaningful.
Struggles whenWide, choppy sessions that close mid-range, where a close outside the channel is quickly followed by a close back through the middle line; stretches when NIFTY stays within about 1%; and gap-up openings.

The year in plain words

On NIFTY futures from 1 Oct 2025 to 30 Sep 2026 with default settings, the system made 133 trades and won 40% of them, finishing ₹47,519 ahead before costs with a profit factor of 1.11. Wins averaged ₹9,235 against ₹5,524 for losses, and almost every trade (129) ended on the middle-band exit. March made ₹71,663 and January ₹32,902, while May and July each lost over ₹37,000; the drawdown peaked at ₹98,885. After ₹20 per order and bid-ask slippage the year's profit shrinks to ₹16,089, a thin margin for the risk carried.

What the settings do

Bar minutesThe candle length. Shorter candles give quicker signals and more trades; longer candles hold for bigger swings.Kc EMAThe EMA length for the channel's middle line, which is also the default exit. A longer EMA lets trades run further before the exit triggers.Kc ATRHow many candles the ATR uses to set the channel width. Shorter periods let the channel widen quickly after a burst of volatility.Kc ATR multHow many ATRs the bands sit from the middle. Wider bands mean fewer but stronger breakouts.Trend filterWhen on, longs are allowed only above the trend EMA and shorts only below it. Turning it off takes breakouts on both sides regardless of trend.Trend EMAThe length of the trend filter EMA in candles. 200 on 15-minute candles covers roughly eight sessions.Exit mode"midband" exits on a close through the middle line; "opposite" waits for a close beyond the opposite band, holding much longer and giving back more.Mode"positional" holds across days; "intraday" stops new entries at LAST_ENTRY and closes everything at EXIT_TIME.Last entryIn intraday mode, the last candle close that can open a trade.Exit timeIn intraday mode, the daily square-off time.Roll timeIn positional mode, when a position is closed on futures expiry day before reopening in the next month.

Risks

  • There is no hard stop; the only exit is a 15-minute close through the middle line, which can be far from entry after a sharp reversal.
  • Positions are carried overnight, so gap risk is not controlled by the rules.
  • The after-costs profit is small compared with a drawdown near ₹1 lakh, so modest changes in costs or market behaviour can erase it.
  • With a 40% win rate, several losing trades in a row are routine.

Who it suits

Swing traders who can hold one NIFTY futures lot overnight, follow 15-minute closing signals, and accept that most of the year's profit may come from one or two trending months.

5

Questions traders ask

What is a Keltner channel breakout strategy?

A Keltner channel is an EMA with bands set a multiple of ATR above and below it. The breakout strategy buys when price closes above the upper band and sells when it closes below the lower band, treating the move as unusually strong. This version adds a 200 EMA trend filter and exits at the middle line.

Is the Keltner breakout with 200 EMA profitable on NIFTY?

In this backtest from 1 Oct 2025 to 30 Sep 2026 it made ₹47,519 before costs and ₹16,089 after ₹20 per order and bid-ask slippage, before statutory charges. The before-costs drawdown was ₹98,885, larger than either figure. Past results do not guarantee future ones.

Why use the middle band as the exit?

The middle line is the 20-period EMA, the channel's idea of fair value. A close back through it says the breakout's momentum has faded. It exits sooner than waiting for the opposite band, keeping more of each gain but cutting some long trends short.

What does the 200 EMA filter do?

It allows long breakouts only when price is above the 200-candle EMA and short breakouts only below it. On 15-minute candles that is roughly an eight-session trend, so the system avoids trading against the market's broader direction.

6

Before you rely on it

WATCH OUTthe 200-bar EMA on 15-minute bars needs ~8 sessions to warm up (WARMUP_DAYS); the source "optimized" parameter set is in-sample by construction. Gross of costs.
WHERE THE RULES WERE UNCLEAR · OUR CHOICESThe description gives no channel parameters or timeframe. Per the spec: KC(20 EMA, 2 x ATR 10) on 15-minute bars, the 200 EMA filter on, the mid-band exit on (EXIT_MODE "opposite" is the source's default exit, kept as a setting), positional (MODE "intraday" is the source's session-end option). Fills are the first tick after the signal bar. The rolled future jumps at each monthly roll: indicators are computed on a roll-adjusted series (from the session after each expiry the jump - its first tick minus the expiry day's last tick, overnight move included - is taken out). Fills are real futures prices.
Also known askeltner breakout
Backtests run on historical NSE data with fills at the last traded price. "Before costs" excludes brokerage, taxes and slippage. Quantsapp is not recommending any strategy; it is just a backtesting utility. Past results are not a promise of future returns.

Log in or sign up

Enter your mobile number. New to Quantsapp? The same OTP creates your free account.

+91

By continuing you agree to the Terms of Use and Privacy Policy.