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

First candle pattern breakout

Many intraday traders watch the first 5-minute candle of a stock and trade the break of its high or low. This version is pickier. It trades only when that opening candle has one of four recognisable shapes, waits for a whole later candle to close outside it, and then manages the trade with a quick move to breakeven and a tight trail. The default stock is RELIANCE, traded through its near-month future.
Trades a stock future's breakout from its first 5-minute candle, but only when that candle has one of four named shapes, with a quick move to breakeven and a tight trail.
Market viewEither direction (follows the move)
TradesSingle-stock near-month futures, 1 lot
RiskOpen-ended (loss not capped by the structure)
CapitalFutures margin
SuitsIntermediate
Trades a month7.2
Typical hold13 min
Profitable months8 of 12
Longest losing run3 trades
Made money inTrend days that close near the high or lowIndia VIX above 14.5Flat opens
Lost money inChoppy days that close mid-rangeIndia VIX below 11.5
Default settings
Symbol
Patterns
Candle minutes
Gap %
Body %
Shadow x
Bb period
Bb dev
SMA period
Slope %
Trail %
Engulf trail %
Engulf stop %
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
RELIANCE Intraday · 1 Oct 25 → 30 Sep 26
Enters
Next print after a 5-minute candle fully beyond the first candle, by 14:30
Legs
BUY FUT · Near month · Current month · 1 lotSELL FUT · Near month · Current month · 1 lot
Exits
stop Far side of the first candle (0.3% beyond on engulfing days)trail At +0.1% (engulfing +0.2%): breakeven, then trail by that distancesignal Gap days: 20-period SMA turns against the tradetime Anything still open at 15:15
Re-entry
Gap days only: one more trade after the first ends
Candle
the first CANDLE_MINUTES of the session on the rolled near-month future of SYMBOL - open = the exchange's session open, high / low = the exchange's running high / low at its end, close = its last print. Prior-day high / low from the daily bars; Bollinger(BB_PERIOD, BB_DEV) on 5-minute closes.
Pattern
checked in this order, first match wins (none = no trade that day): "reversal" - gap up (open >= prior high + GAP_PCT %) with a red candle opening above the upper band, or gap down with a green candle opening below the lower band; "gap" - open >= prior high + GAP_PCT % (or <= prior low - GAP_PCT %) with a body >= BODY_PCT %; "engulfing" - the candle's body engulfs the previous session's last 5-minute body, opposite colour; "shadow" - a shadow at least SHADOW_X times the body (body >= BODY_PCT %). PATTERNS limits the day to one group ("all" = any).
Entry
the first later 5-minute bar (closing by ENTRY_TO) that lies completely above the first candle's high (its low above it) -> buy LOTS of the future at the next print; completely below its low -> sell. None on a day SYMBOL is in the F&O ban.
Stop
the first candle's low for a long / high for a short; "engulfing" days ENGULF_STOP_PCT % beyond it.
Trail
once the trade is TRAIL_PCT % of its notional in profit (engulfing: ENGULF_TRAIL_PCT %), the stop goes to entry and then trails the best price by that same distance ("trail").
Target
"gap" and "reversal" days - the first 5-minute bar whose SMA(SMA_PERIOD) slope turns against the trade by more than SLOPE_PCT % of price ("SMA turn"), exit at the next print.
Exit
anything open at EXIT_TIME is squared off ("square-off").
Re-entry
"gap" days allow a second trade (either side) after the first one ends; other days one trade.
2

Results

PRE-BUILT · DEFAULTS
RELIANCE · 2025-10-01 → 2026-09-30 · 87 trades · before costs
Net P&L+₹13,750
Win rate72%
Max drawdown−₹16,050
Avg per trade+₹158
Profit factor1.25
Worst trade−₹7,500
3

Where it made and lost money

On RELIANCE the strategy earned on days that kept going and lost on days that swung back. Trades on trend days, sessions that closed near their high or low, made ₹21,000 over 26 trades with an 85% win rate, because the breakout ran far enough to arm the trail. Choppy days with a wide range and a mid-range close lost ₹14,400 over 30 trades, as breakouts reversed through the first candle to the full stop. India VIX mattered as well: entries with VIX above 14.5 made ₹14,900 over 36 trades, while calm days with VIX below 11.5 lost ₹3,000 over 15. Figures are before costs.

Kind of session on the entry day
Quiet session (range under 0.75%)+₹7,15031 trades71% won
Trend day (closed near the high or low)+₹21,00026 trades85% won
Choppy day (wide range, closed mid-range)−₹14,40030 trades63% won
Session direction on the entry day
NIFTY closed above its open+₹21,45040 trades72% won
NIFTY closed below its open−₹7,70047 trades72% won
India VIX the evening before
VIX below 11.5 (calm)−₹3,00015 trades67% won
VIX 11.5-14.5 (normal)+₹1,85036 trades72% won
VIX above 14.5 (nervous)+₹14,90036 trades75% won
Day of the week
Monday+₹9,85021 trades67% won
Tuesday+₹4,15012 trades75% won
Wednesday−₹7,45020 trades75% won
Thursday−₹35018 trades61% won
Friday+₹7,45015 trades87% won
Trend going in
Uptrend (NIFTY above its 20-day average)−₹45041 trades71% won
Downtrend (NIFTY below its 20-day average)+₹14,20046 trades74% won
How the entry day opened
Gap up of 0.4% or more−₹45013 trades62% won
Flat open+₹11,85045 trades76% won
Gap down of 0.4% or more+₹2,35029 trades72% won
Expiry day (NIFTY weekly)
Expiry day+₹7,15017 trades76% won
Other days+₹6,60070 trades71% won
The same trades, split by the market conditions around each entry, before costs.
4

About this strategy

  1. Take the first 5-minute candle of the session on the stock's near-month future and compare it with the previous day's range and a 20-period Bollinger band on 5-minute closes.
  2. Label it, first match wins: a gap reversal (a gap beyond the prior high or low that opens outside the band and turns back), a plain gap of 0.2% or more, an engulfing candle against the prior session's last candle, or a long-shadow candle. No label, no trade.
  3. Wait for a later 5-minute candle, closing by 14:30, that sits entirely above the first candle's high (buy one lot) or entirely below its low (sell one lot).
  4. Place the stop at the far side of the first candle; engulfing days put it 0.3% further away.
  5. Once the trade is 0.1% in profit (0.2% on engulfing days), move the stop to entry and trail the best price by the same distance.
  6. On gap and gap-reversal days, also exit when the 20-period SMA turns against the trade. Square off at 15:15; gap days allow a second trade.

Why traders use it

The opening candle carries the overnight news and the first wave of orders, so its high and low often act as the day's first battle lines. Filtering for specific shapes is an attempt to trade only the openings that say something: a gap that holds, a gap that fails, a candle that swallows the previous one. The very tight breakeven and trail aim to bank small gains quickly and rarely let a winning trade turn into a loss.

Works best whenThe stock trends cleanly after its opening candle and closes near the day's high or low, so the breakout runs past the breakeven level. In this test elevated India VIX (above 14.5) and flat opens also lined up with the better results.
Struggles whenChoppy sessions with a wide range that close mid-range: breakouts from the first candle reverse back through it and hit the full stop. Calm days with India VIX below 11.5 were also slightly negative in this test.

The year in plain words

On RELIANCE futures from 1 Oct 2025 to 30 Sep 2026, with default settings, the strategy took 87 trades, won 72% and made ₹13,750 before costs, a profit factor of 1.25. The tight trail ended 72 trades, which explains the shape of the results: an average win of ₹1,094 against an average loss of ₹2,629. March was the strongest month (₹10,400); October lost ₹8,750. After ₹20 per order and bid-ask slippage the result becomes a ₹2,080 loss. The small gains per trade were not enough to pay trading costs.

What the settings do

PatternsWhich opening shapes can trigger a trade. All allows any of the four; picking one limits the strategy to that pattern's days.Candle minutesThe length of the opening candle that is classified and broken out from.Gap %How far beyond the previous day's high or low the open must be to count as a gap. Larger values mean fewer gap days.Body %The smallest candle body, as a percentage of price, that counts. It filters out tiny, indecisive opening candles.Shadow xHow many times longer than the body a wick must be for a long-shadow candle.Bb periodThe number of 5-minute candles in the Bollinger band used to spot gap reversals.Bb devThe band width in standard deviations. Wider bands make gap reversals rarer.SMA periodThe moving average whose turn ends gap and gap-reversal trades. A shorter average turns sooner.Slope %How sharply the SMA must slope against the trade, per candle, to trigger that exit.Trail %The profit that moves the stop to breakeven, and the distance the trail then keeps behind the best price.Engulf trail %The same breakeven and trail distance, used on engulfing days only.Engulf stop %How far beyond the first candle the stop sits on engulfing days, giving those trades more room.Entry toThe last candle close that may open a trade.Exit timeWhen any open trade is squared off.

Risks

  • Average losses were more than twice the average win, so a few full stops can erase many small trailed gains.
  • A trail of 0.1% of price is very tight, and real fills on a fast stock can be worse than the trail level.
  • The thresholds were adapted from a version tuned on particular stocks, so other stocks may behave very differently.
  • Costs per trade matter a lot when the average gain is small, which turned a profit before costs into a loss after costs.

Who it suits

Intraday traders who follow single-stock futures closely in the first hours, can act on 5-minute closes, have margin for a stock futures lot, and are comfortable with frequent small exits.

5

Questions traders ask

What is the first candle breakout strategy?

It uses the high and low of the first candle of the day, often 5 or 15 minutes, as triggers. A move above the high is a buy signal and a move below the low is a sell signal, with the opposite end of the candle as the stop. This version adds pattern filters and needs a full candle beyond the level.

Is the first candle pattern breakout profitable?

On RELIANCE futures from 1 Oct 2025 to 30 Sep 2026 it made ₹13,750 before costs but lost ₹2,080 after ₹20 per order and bid-ask slippage, statutory charges excluded. Past results do not guarantee future ones.

Which opening candle patterns does it use?

Four: a gap that reverses at a Bollinger band, a plain gap with a real body, a bullish or bearish engulfing candle against the previous session's last candle, and a candle with a wick at least twice its body. Days without one of these are skipped.

Can I use it on other stocks or NIFTY?

Yes, the symbol can be changed to any F&O stock future, and NIFTY works too. Thresholds are set as a percentage of price, so they scale with the stock, but results will differ from stock to stock.

6

Before you rely on it

WATCH OUTthresholds were fitted on the same stocks and period; stock selection is in-sample; a breakeven stop at +0.1 % is hit often. Gross of costs.
WHERE THE RULES WERE UNCLEAR · OUR CHOICES- The source's thresholds are absolute points for its stock list; they are converted to % of price (spec): gap 2 pts -> GAP_PCT 0.2 %, body 0.5 pt -> BODY_PCT 0.05 %, +1 / +2 pt trail -> 0.1 % / 0.2 %, 3 pts beyond for engulfing -> 0.3 %, slope change 0.2 -> SLOPE_PCT 0.02 % of price per bar. - "Move the stop to entry + 1 after +1, then trail 1:1" is implemented as breakeven at +TRAIL_PCT and a trail of TRAIL_PCT behind the best price (qa.Trail on the futures notional) - within a tick of the source's wording. - BB and SMA periods are unstated: 20 and 2 (spec). The breakout decides the side on every pattern; the source does not tie a direction to each shape. - The session after a futures expiry is skipped: the prior-day high / low and the band belong to the expired contract, a basis away (the rolled series is unadjusted - known SDK gap). - Default SYMBOL RELIANCE; any F&O stock future (NIFTY works for a test).
Also known asfirst candle strategyopening candle 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.