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

Heikin-Ashi Supertrend

This version of the Supertrend is drawn on Heikin-Ashi candles rather than ordinary ones, using a wide band of six times a 6-candle ATR around a median-smoothed midpoint. It runs on 5-minute NIFTY futures candles and is always in the market: long while the line is below price, short once it flips above. Positions are carried overnight and across days until the next flip.
Always holds one NIFTY futures lot, long or short, following a wide Supertrend drawn on 5-minute Heikin-Ashi candles and reversing only when the line flips.
Market viewEither direction (follows the move)
TradesNIFTY near-month futures, 1 lot, always in
RiskOpen-ended (loss not capped by the structure)
CapitalFutures margin
SuitsIntermediate
Trades a month14
Typical hold1 days
Profitable months7 of 12
Longest losing run9 trades
Made money inNIFTY moving over 1% while the trade is heldTrend days that close near the high or lowIndia VIX above 14.5
Lost money inNIFTY staying within ±1% while heldChoppy days that close mid-rangeWeekly expiry days
Default settings
Symbol
Bar minutes
ATR period
Multiplier
Median len
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 5-minute Heikin-Ashi candle closes through the Supertrend band
Legs
BUY FUT · Near month, on a Heikin-Ashi Supertrend flip up · Current month, rolled at expiry · 1 lotSELL FUT · Near month, on a Heikin-Ashi Supertrend flip down · Current month, rolled at expiry · 1 lot
Exits
signal opposite Supertrend flip reverses the positionroll closed 15:15 on futures expiry, reopened next month
Re-entry
Always in after the first flip
Candles
BAR_MINUTES bars of the rolled near-month future (anchored at 09:15, continuous across sessions) turned into Heikin-Ashi candles (close = (O + H + L + C) / 4, open = average of the previous HA open and close, high / low = extremes of the bar and the HA open / close).
Line
midpoint = moving MEDIAN over MEDIAN_LEN candles of (HA high + HA low) / 2; ATR(ATR_PERIOD) (Wilder) of the HA candles; bands = midpoint +/- MULTIPLIER x ATR with the usual final-band ratchet. The trend flips up when an HA close goes above the upper band, down when it goes below the lower band.
Trade
stop-and-reverse at the first tick after the flip candle closes (a real futures price, not the HA close): a flip up buys LOTS (closing any short), a flip down sells. Always in from the first flip of the test.
Roll
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 · 168 trades · before costs
Net P&L+₹1,23,729
Win rate39%
Max drawdown−₹1,53,206
Avg per trade+₹736
Profit factor1.13
Worst trade−₹41,775
3

Where it made and lost money

This is a pure trend follower, and the evidence shows it plainly. Trades during which NIFTY fell more than 1% made +₹4,47,185 over 31 trades, and those during which it rose more than 1% made ₹2,09,809 over 23, because the always-in system is short or long for the whole move. The 79 trades where NIFTY stayed within ±1% lost ₹3,13,104, as the line flipped back and forth. Entries on 56 choppy days lost ₹2,61,379, while 47 trend-day entries made ₹3,00,178. Nervous evenings with India VIX above 14.5 made ₹1,85,256, and the 29 trades opened on weekly expiry days lost ₹1,09,505.

Market while the trade was held
NIFTY rose over 1% while held+₹2,09,80923 trades61% won
NIFTY within ±1% while held−₹3,13,10479 trades28% won
NIFTY fell over 1% while held+₹4,47,18531 trades74% won
Kind of session on the entry day
Quiet session (range under 0.75%)+₹88,81064 trades39% won
Trend day (closed near the high or low)+₹3,00,17847 trades55% won
Choppy day (wide range, closed mid-range)−₹2,61,37956 trades25% won
Expiry day (NIFTY weekly)
Expiry day−₹1,09,50529 trades38% won
Other days+₹2,37,114138 trades39% won
India VIX the evening before
VIX below 11.5 (calm)+₹32,75042 trades48% won
VIX 11.5-14.5 (normal)−₹90,39876 trades34% won
VIX above 14.5 (nervous)+₹1,85,25649 trades39% won
Session direction on the entry day
NIFTY closed above its open−₹51,57280 trades38% won
NIFTY closed below its open+₹1,79,18187 trades40% won
Trend going in
Uptrend (NIFTY above its 20-day average)−₹17,11082 trades41% won
Downtrend (NIFTY below its 20-day average)+₹1,44,71885 trades36% won
Day of the week
Monday−₹45,28434 trades32% won
Tuesday−₹31,23226 trades42% won
Wednesday+₹58,43042 trades36% won
Thursday+₹50,09634 trades44% won
Friday+₹95,59931 trades42% won
How the entry day opened
Gap up of 0.4% or more+₹23,19838 trades37% won
Flat open+₹4,438101 trades39% won
Gap down of 0.4% or more+₹99,97328 trades43% won
The same trades, split by the market conditions around each entry, before costs.
4

About this strategy

  1. Build 5-minute candles of the near-month NIFTY future, adjusted so monthly rolls do not create false jumps, and convert them to Heikin-Ashi candles.
  2. Take the midpoint of each Heikin-Ashi high and low, smooth it with a 3-candle moving median, and set bands 6 × ATR(6) above and below it.
  3. The trend turns up when a Heikin-Ashi close goes above the upper band and down when it closes below the lower band.
  4. On a flip, reverse the position at the first real futures tick after that candle closes: buy one lot on an up-flip, sell one lot on a down-flip.
  5. There is no separate stop or target; the opposite flip is the only exit, and the trade is held overnight.
  6. On futures expiry day close at 15:15 and reopen the same side in the next month at the following session's first tick.

Why traders use it

Supertrend is one of the most followed trend indicators among Indian futures traders, but on plain candles it flips often in sideways markets. Heikin-Ashi averaging and a median midpoint calm the input, and the very wide 6 × ATR band means only a substantial reversal changes the side. The result is a slow, always-in trend follower that tries to stay with multi-day moves and accept fewer, larger trades.

Works best whenSustained moves of more than 1% in either direction while a trade is open, sessions that trend and close near their extremes, and volatile spells with India VIX above 14.5, as in March 2026 in this test.
Struggles whenRanges in which NIFTY stays within about 1% for days, so the line flips without follow-through; choppy wide-range sessions that close mid-range; weekly expiry days; and periods of middling India VIX.

The year in plain words

From 1 Oct 2025 to 30 Sep 2026 on NIFTY futures with default settings, the system closed 168 trades and won 39%, for ₹1,23,729 before costs and a profit factor of 1.13. It lived on big winners: the average win was ₹16,056 against an average loss of ₹8,931, and March alone made ₹1,39,524. October lost ₹80,528 and four of the last five months were negative, with a maximum drawdown of ₹1,53,206. Because it trades relatively rarely, costs took a smaller bite: after ₹20 per order and bid-ask slippage it kept ₹83,949.

What the settings do

Bar minutesCandle size from 5 to 60 minutes. Larger candles react more slowly, flip less often and hold trends longer.ATR periodHow many candles the ATR averages. A short period makes the band width respond quickly to bursts of volatility.MultiplierHow many ATRs the bands sit from the midpoint. Lower values flip sooner and trade more; higher values ignore more pullbacks but give back more before reversing.Median lenThe number of candles in the moving median that smooths the midpoint. A longer median filters spikes but delays the line.Roll timeWhen the position is closed on futures expiry day before reopening in the next month's contract.

Risks

  • There is no fixed stop, so a single trade can lose a lot before the line flips; the worst trade here lost ₹41,775.
  • The position is always open and held overnight, so it is fully exposed to gaps and needs futures margin at all times.
  • Profit depended on a few months; without March the year would have been much weaker.
  • Drawdowns larger than ₹1.5 lakh per lot occurred, which can test the discipline to keep following the signals.

Who it suits

Patient positional traders who can keep a NIFTY futures lot open at all times, tolerate a sub-40% win rate, and accept deep drawdowns in return for staying in long trends.

5

Questions traders ask

What is a Heikin-Ashi Supertrend?

It is the Supertrend indicator calculated on Heikin-Ashi candles instead of normal candles. Because Heikin-Ashi averages each candle, the line is smoother and flips less often. This version also uses a median midpoint and a wide multiplier of 6 on a 6-period ATR.

Is the Heikin-Ashi Supertrend profitable on NIFTY futures?

In this backtest from 1 Oct 2025 to 30 Sep 2026 it made ₹1,23,729 before costs and ₹83,949 after ₹20 per order and bid-ask slippage, with statutory charges not included. It also had a ₹1,53,206 drawdown before costs and a 39% win rate. Past results do not guarantee future ones.

Does it use a stop loss?

Not a separate one. The Supertrend line acts as the exit: when price closes through it, the system reverses. The flip is acted on only after the 5-minute candle closes, so the actual exit can be some way past the line.

How is the monthly futures roll handled?

The candles are built on a roll-adjusted price series so the jump between contracts does not create a fake signal. On expiry day the position is closed at 15:15 and the same side is reopened in the next month at the following open.

6

Before you rely on it

WATCH OUTwin rate ~42-50% before costs, similar to a normal Supertrend; HA prices are synthetic (never used for fills here). Gross of costs.
WHERE THE RULES WERE UNCLEAR · OUR CHOICESThe moving-median length is not stated: MEDIAN_LEN 3 per the spec. The source shows 5-minute NIFTY / BANKNIFTY futures; NIFTY is the default. Its dashboard "trailing stop" is the band and not a resting order, so exits are only the opposite flip, acted on after the candle closes. The rolled future jumps at each monthly roll: the candles are built 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), so a roll does not print a flip by itself.
Also known asHA supertrend
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.