QuantsappFaster in the app: live data, alerts, tradingOpen
Log inStart free
Futures · technicalIntradayNIFTYmedium complexity

SMA20/200 pullback candle

This intraday futures strategy trades pullbacks inside a trend. On 5-minute NIFTY futures bars, it waits until the 20-period SMA is above a 200-period SMA and rising, lets price dip back to the 20 SMA, and then needs a reversal candle before buying. Short trades mirror the rules in a downtrend. Three trigger candles are available; the default is a bullish engulfing bar after a short pullback.
Trades 5-minute NIFTY futures pullbacks to the 20 SMA in a 200 SMA trend, entering on an engulfing candle with a candle stop and 2 ATR target.
Market viewEither direction (follows the move)
TradesNIFTY near-month futures, 1 lot
RiskOpen-ended (loss not capped by the structure)
CapitalFutures margin
SuitsIntermediate
Trades a month13.9
Typical hold25 min
Profitable months5 of 12
Longest losing run8 trades
Made money inTrend days that close near the high or low
Lost money inChoppy days with a wide rangeDays after India VIX closed above 14.5Quiet sessions with a range under 0.75%
Default settings
Symbol
Variant
Direction
Bar minutes
SMA fast
SMA slow
ATR n
Pullback ATR
Compress ATR
Target ATR
Max bars
Break tick
Roll skip sessions
Entry from
Entry to
Exit 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 Intraday · 1 Oct 25 → 30 Sep 26
Enters
Next tick after an engulfing 5-minute candle at the 20 SMA in a 200 SMA trend, 09:30-14:45
Legs
BUY FUT · Near month · Current month · 1 lotSELL FUT · Near month · Current month · 1 lot
Exits
stop Beyond the extreme of the trigger candle and the candle before ittarget 2 ATR from entrytime Six bars after entry, or 15:15 at the latest
Re-entry
Yes - the next valid setup after the trade closes, one trade at a time
Bars
BAR_MINUTES bars of the rolled near-month future, anchored at 09:15, continuous across sessions. SMA_FAST and SMA_SLOW of the closes, Wilder ATR(ATR_N), EMA 9.
Trend
long - close above SMA_SLOW, SMA_FAST above SMA_SLOW and SMA_FAST higher than 3 bars earlier. Short is the mirror (DIRECTION "both"; "long_only" takes longs only).
Pullback
the bar's range touches SMA_FAST, or it closes within PULLBACK_ATR x ATR of it.
Trigger
VARIANT "goldmine" - at least 2 of the 3 bars before it closed lower than their previous close, and a green bar whose body engulfs the previous red bar's body. VARIANT "money_machine" - the 3 bars before it span at most COMPRESS_ATR x ATR, and a green "Hulk" bar (body >= 80% of its range, each wick <= 15%) closes above their high. VARIANT "profit_shooter" - the same 2-of-3 pullback, and a bullish pin bar (body <= 30% of range, lower wick >= 60% of range and >= 2x the body, upper wick <= 15%).
Entry
goldmine / money_machine - at the first tick after the trigger bar closes (the next bar's open). profit_shooter - when the NEXT bar trades BREAK_TICK above the pin bar's high, at that tick; if that bar does not break it the setup lapses. Trigger bars must close ENTRY_FROM .. ENTRY_TO; one trade at a time.
Stop
goldmine - the lower low of the trigger bar and the bar before it; money_machine - the trigger bar's low; profit_shooter - the pin bar's low minus 0.2 x ATR. All at the level.
Exit
goldmine - TARGET_ATR x ATR target, or MAX_BARS bars after the entry; money_machine - TARGET_ATR x ATR target; profit_shooter - no target until the trade has been 1.5R in profit, then the first bar that closes below EMA 9 exits at the next tick. Anything open at EXIT_TIME is squared off. Shorts mirror all of it.
2

Results

PRE-BUILT · DEFAULTS
NIFTY · 2025-10-01 → 2026-09-30 · 167 trades · before costs
Net P&L−₹29,296
Win rate35%
Max drawdown−₹33,335
Avg per trade−₹175
Profit factor0.78
Worst trade−₹4,849
3

Where it made and lost money

The only group that made money in this test was trend days, which earned ₹8,341 over 48 trades: there a pullback to the 20 SMA really was a pause, and the 2 ATR target was within reach. Choppy days lost ₹17,755 over 35 trades with a 29% win rate, as the candle stop sits just below a single bar and wide swings took it out. Quiet sessions lost ₹19,752 over 83 trades because moves were too small to reach the target, so trades ended on the six-bar time exit or the stop. Evenings with India VIX above 14.5 lost ₹18,341 over 43 trades. The averages define a trend, but not the kind of day.

Kind of session on the entry day
Quiet session (range under 0.75%)−₹19,75283 trades34% won
Trend day (closed near the high or low)+₹8,34148 trades42% won
Choppy day (wide range, closed mid-range)−₹17,75535 trades29% won
Session direction on the entry day
NIFTY closed above its open−₹22,62083 trades31% won
NIFTY closed below its open−₹6,54783 trades39% won
India VIX the evening before
VIX below 11.5 (calm)−₹8,00151 trades43% won
VIX 11.5-14.5 (normal)−₹2,82572 trades32% won
VIX above 14.5 (nervous)−₹18,34143 trades30% won
Day of the week
Monday−₹13,20135 trades31% won
Tuesday−₹10,47539 trades38% won
Wednesday−₹52028 trades39% won
Thursday+₹60127 trades33% won
Friday−₹7,82136 trades31% won
Trend going in
Uptrend (NIFTY above its 20-day average)−₹9,08587 trades33% won
Downtrend (NIFTY below its 20-day average)−₹20,08179 trades37% won
How the entry day opened
Gap up of 0.4% or more−₹3,42518 trades33% won
Flat open−₹12,716129 trades36% won
Gap down of 0.4% or more−₹13,02619 trades26% won
Expiry day (NIFTY weekly)
Expiry day−₹13,93940 trades38% won
Other days−₹15,227126 trades34% won
The same trades, split by the market conditions around each entry, before costs.
4

About this strategy

  1. Build 5-minute bars from near-month NIFTY futures and compute the 20 and 200 SMA, a 14-bar ATR and a 9 EMA.
  2. Uptrend: price above the 200 SMA, the 20 SMA above the 200 SMA, and the 20 SMA higher than three bars ago. A downtrend is the mirror image.
  3. Pullback: the bar touches the 20 SMA or closes within half an ATR of it.
  4. Default trigger: at least two of the previous three bars closed lower, and a green bar's body engulfs the prior red bar's body. Other variants use a tight three-bar range broken by a strong full-bodied candle, or a pin bar.
  5. Enter one lot on the tick after the trigger bar closes, if it closed between 09:30 and 14:45. Only one trade at a time.
  6. Default exits: stop below the lower low of the trigger bar and the bar before it, target 2 ATR away, or a time exit six bars after entry. Everything is squared off at 15:15.
  7. No new trades for three sessions after each monthly futures expiry, while the averages still mix the old and new contracts.

Why traders use it

Buying a dip inside an established trend is one of the oldest trading ideas: the trend gives the direction, the pullback gives a better price, and the candle shows buyers stepping back in. The 20 and 200 SMA pair is a familiar way to define the trend, and engulfing or pin-bar candles are among the first patterns traders learn. Combining all three into fixed rules lets a trader test whether the familiar chart setup holds up on intraday NIFTY futures.

Works best whenTrend days with orderly, shallow pullbacks to the 20 SMA, where the engulfing candle marks the end of the dip and price travels two ATRs within six bars. These were the only profitable days in this test.
Struggles whenChoppy, wide-range days that sweep through the candle stop, quiet days too small for the 2 ATR target, and nervous sessions after a high India VIX close; all of these lost in this test.

The year in plain words

With the default engulfing variant on NIFTY futures from 1 Oct 2025 to 30 Sep 2026, the strategy took 167 trades and won only 35% of them, losing ₹29,296 before costs (profit factor 0.78). Winners averaged ₹1,742 and losers ₹1,196, not enough to make up for the low hit rate. 80 trades hit the stop, 65 used the six-bar time exit and just 21 reached the 2 ATR target. March lost ₹12,542 and April made ₹7,476. Because it trades often for small amounts, costs hit hard: after ₹20 per order and bid-ask slippage the loss is ₹70,722.

What the settings do

VariantWhich trigger candle and exit set is used: an engulfing bar with a 2 ATR target and six-bar time exit (default), a compressed range broken by a strong candle with a 2 ATR target, or a pin bar that trails a 9 EMA once 1.5 times the risk is reached.DirectionBoth trades longs in uptrends and shorts in downtrends; long only ignores the short setups.Bar minutesThe bar size all the indicators and candles are built on. Larger bars produce fewer, slower signals.SMA fastThe short moving average that price pulls back to and that must be rising. A shorter one sits closer to price and is touched more often.SMA slowThe long moving average that defines the trend. A longer one changes direction less often.ATR nThe number of bars in the ATR used for the pullback zone, targets and range filters.Pullback ATRHow close, in ATRs, a close must be to the fast SMA to count as a pullback if the bar did not touch it.Compress ATRFor the compressed-range variant, the maximum span of the three bars before the trigger, in ATRs.Target ATRThe profit target distance in ATRs for the engulfing and compressed-range variants.Max barsFor the engulfing variant, how many bars after entry a trade is closed if neither stop nor target is hit.Break tickFor the pin-bar variant, how far beyond the pin bar's high the next bar must trade to trigger the entry.Roll skip sessionsHow many sessions after a futures expiry are skipped, because the long average still contains prices from the previous contract.Entry fromThe earliest time a trigger bar may close.Entry toThe latest time a trigger bar may close.Exit timeWhen any open trade is squared off.

Risks

  • Average profit per trade is small relative to costs, which more than doubled the loss after charges.
  • Candle-pattern definitions vary between traders, so small changes in the rules can change results a lot.
  • The 200-bar average on 5-minute data spans about three sessions, so it reacts slowly to a change in trend.
  • A futures lot moves fast, and stops placed under a candle low can fill worse on a sharp move.

Who it suits

Chart-based traders who already use moving averages and candlestick patterns and want to see how a fixed, mechanical version of that approach performs on NIFTY futures, with margin for one lot.

5

Questions traders ask

What is an SMA 20/200 pullback strategy?

It uses the 200-period moving average to confirm the trend and the 20-period average as the area to buy dips in an uptrend or sell rallies in a downtrend. A trade is taken only after price returns to the 20 SMA and a reversal candle appears.

Is the SMA pullback candle strategy profitable on NIFTY?

Not in this test. From 1 Oct 2025 to 30 Sep 2026 the default version lost ₹29,296 before costs and ₹70,722 after ₹20 per order and bid-ask slippage, with only 35% winners. Past results do not guarantee future ones, and other variants may behave differently.

What is a bullish engulfing candle?

It is a green candle whose body fully covers the body of the red candle before it. It shows buyers overpowering the sellers of the previous bar, and here it must follow a short pullback of at least two lower closes out of three.

Why skip trading right after futures expiry?

The strategy runs on a continuous futures series. At each monthly expiry the price jumps to the next contract, and the 200-bar average still contains old-contract prices for about three sessions, so trend readings would be distorted.

6

Before you rely on it

ADAPTED FOR TODAY'S NSE RULES- The sources give no session window: entries 09:30-14:45 and a 15:15 square-off are the spec's interpretation. - The rolled future jumps by the next month's basis at every expiry, and SMA200 of 5-minute bars spans almost three sessions, so no trade is taken in the first ROLL_SKIP_SESSIONS sessions after a futures expiry (the averages would still be mixing the two contracts). - The source rules come from an uncredited video via the repository author; the trigger shapes are as the spec restates them.
WHERE THE RULES WERE UNCLEAR · OUR CHOICESthe source records the fill at the signal bar's close although it is tagged "next open"; here the fill is the first tick after the bar closes. Gross of costs.
Also known asGoldmineMoney MachineProfit ShooterSMA20/SMA200 trend pullback to SMA20 with a candle trigger (engulfing / compressed-range marubozu breakout / pin-bar break), target 2 ATR or 1.5R
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.