DEV Community

shakti tiwari
shakti tiwari

Posted on

Intraday Trading Nifty Strategies: 5 Working Setups + Python (2026)

Intraday Trading Nifty Strategies

Intraday trading Nifty is the art of catching same-day moves in the Nifty 50 index using futures or options, then squaring off before 3:30 PM IST. Done right, it generates daily income. Done wrong, it is a fast burn of capital. This guide gives you 5 working intraday trading Nifty strategies — VWAP, Opening Range Breakout (ORB), PCR filter, pre-open gap, and OI breakthrough — plus hard risk rules and Python indicator snippets you can run on Mac, Windows, Linux, or Termux.

Whether you trade Nifty futures on Zerodha Kite, Nifty options on Dhan, or automate via API, these setups are framework-agnostic. Language is Hinglish-friendly so concepts stick: "trend ke saath chalna" beats fighting the market.

Why Trade Nifty Intraday?

  • Liquidity: Nifty futures and ATM options have deep order books; slippage is low versus mid-cap stocks.
  • Leverage: F&O margin lets you control large notional with modest capital (SEBI-capped).
  • Clean technicals: Index moves are smoother, driven by institutions, less prone to operator manipulation than individual stocks.
  • Defined day: You close by evening — no overnight gap risk (unless you choose to carry).

But intraday demands discipline. The same leverage that amplifies profit amplifies loss. Risk rules below are non-negotiable.

Strategy 1: VWAP Mean Reversion & Trend

VWAP (Volume Weighted Average Price) is the average price weighted by volume. It is the institutional fair-value line.

  • Trend mode: If Nifty futures stay above VWAP and VWAP slopes up, buy dips toward VWAP with a tight stop below it.
  • Reversion mode: If price spikes far above VWAP (say +0.4% away) with slowing volume, fade back toward VWAP.

VWAP is best in the first 2–3 hours. After 2 PM, trends often extend into close.

Python VWAP Snippet

#!/usr/bin/env python3
"""Compute VWAP from minute candles."""
def vwap(highs, lows, closes, volumes):
    typical = [(h + l + c) / 3 for h, l, c in zip(highs, lows, closes)]
    pv = sum(t * v for t, v in zip(typical, volumes))
    cum_vol = sum(volumes)
    return pv / cum_vol if cum_vol else 0

# Example with 5 minute bars (replace with real data from broker)
highs   = [24010, 24020, 24005, 24030, 24050]
lows    = [23990, 24000, 23985, 24010, 24030]
closes  = [24000, 24010, 23995, 24025, 24045]
volumes = [120000, 95000, 110000, 140000, 180000]
print("VWAP:", round(vwap(highs, lows, closes, volumes), 2))
Enter fullscreen mode Exit fullscreen mode

Run:

# Mac/Linux/Termux
python3 vwap.py
# Windows CMD
py vwap.py
Enter fullscreen mode Exit fullscreen mode

Strategy 2: Opening Range Breakout (ORB)

The first 15 minutes (9:15–9:30) define the opening range (high/low). A breakout above the range high (with volume) is a long signal; below the range low is a short.

Rules:

  • Wait for 9:30 AM. Mark high/low of first 15 min.
  • Long if price closes above range high + 5 points, stop below range low.
  • Short if price closes below range low − 5 points, stop above range high.
  • Avoid ORB in the first 5 min — fakeouts are common.

ORB works best on event days (RBI policy, US CPI, results) when a directional move is likely. On dead range days, ORB whipsaws — that is where the PCR filter (Strategy 3) saves you.

Python ORB Detector

def orb_signal(first_high, first_low, current_high, current_low, buffer=5):
    if current_high > first_high + buffer:
        return "LONG"
    if current_low < first_low - buffer:
        return "SHORT"
    return "NO TRADE"

print(orb_signal(24020, 23980, 24030, 23990))  # LONG if breakout
Enter fullscreen mode Exit fullscreen mode

Strategy 3: PCR Filter (Avoid Bad Days)

Before taking any directional intraday trade, check the Put-Call Ratio from the option chain (see our Option Chain Analysis article).

  • If PCR is falling while Nifty rises → call writing pressure, suspect a top → avoid fresh longs.
  • If PCR rising while Nifty falls → put writing, suspect a bottom → avoid fresh shorts.
  • If PCR stable and price trends → trend is "confirmed" by sentiment.

A simple filter: only take long ORB/VWAP trades when PCR is not in extreme call-heavy zone (<0.7), and only take shorts when PCR is not in extreme put-heavy zone (>1.4). This single rule cuts a large chunk of losing trades.

Python PCR Filter

def pcr_filter(pcr, bias="LONG"):
    if bias == "LONG" and pcr < 0.7:
        return "BLOCK"      # too call-heavy, avoid longs
    if bias == "SHORT" and pcr > 1.4:
        return "BLOCK"      # too put-heavy, avoid shorts
    return "ALLOW"

print(pcr_filter(0.65, "LONG"))   # BLOCK
print(pcr_filter(1.0, "LONG"))    # ALLOW
Enter fullscreen mode Exit fullscreen mode

Strategy 4: Pre-Open Gap Trading

NSE runs a pre-open session (9:00–9:15 AM) that sets the equilibrium price via matching. A big gap up/down vs previous close often continues or reverses depending on context.

  • Gap-and-go: If Nifty gaps up with strong global cues (US overnight green, SGX Nifty up) and holds above previous close after 9:15, buy the dip toward previous close.
  • Gap-fill: If gap is due to a single news spike but momentum fades in first 15 min, fade back to fill the gap.

Use the pre-open window to plan, not to trade blindly. SGX Nifty (now GIFT Nifty) is your overnight cue.

Python Gap Calculator

def gap_percent(prev_close, preopen_price):
    return round((preopen_price - prev_close) / prev_close * 100, 2)

print(gap_percent(24000, 24120))  # +0.5% gap up
Enter fullscreen mode Exit fullscreen mode

Strategy 5: OI Breakthrough

Combining price with option chain OI gives the OI breakthrough setup:

  • Identify the max call OI strike (resistance) and max put OI strike (support) from the chain.
  • If Nifty futures break above max call OI and call OI starts unwinding (writers covering) → strong long.
  • If Nifty breaks below max put OI and put OI unwinds → strong short.

This is the same logic from option chain analysis, applied intraday. It is the highest-conviction setup among the five when confirmed by volume.

Python OI Breakthrough Check

def oi_breakthrough(spot, max_call_oi_strike, max_put_oi_strike,
                    call_oi_change, put_oi_change):
    if spot > max_call_oi_strike and call_oi_change < 0:
        return "LONG (call writers covering)"
    if spot < max_put_oi_strike and put_oi_change < 0:
        return "SHORT (put writers covering)"
    return "RANGE / NO SIGNAL"

print(oi_breakthrough(24100, 24050, 23950, -15000, 0))
Enter fullscreen mode Exit fullscreen mode

Risk Rules (Non-Negotiable)

  1. Risk per trade ≤ 1–2% of capital. On ₹2 lakh capital that is ₹2,000–₹4,000 max loss per trade.
  2. Always use a stop loss. For futures, a 20–40 point Nifty stop; for options, a premium-based stop (e.g., exit if premium halves).
  3. Max 2–3 trades/day. Overtrading is the silent killer.
  4. No trading in the last 15 min unless you are experienced — expiry-day last hour is a casino.
  5. Respect events. Avoid directional bets 30 min before RBI/US data; vol expands unpredictably.
  6. Daily loss limit. If you hit −2% for the day, shut the screen. Aapka dimaag cloudy ho jata hai after losses.
  7. SEBI margin rules: ensure you have the required SPAN + Exposure margin; broker auto-square-off (ASO) will close you at the worst time otherwise.

Putting It Together: A Sample Day

  • 9:00–9:15: Check GIFT Nifty, pre-open, compute PCR, mark max OI strikes.
  • 9:30: ORB range set.
  • 9:30–11:30: Take VWAP/ORB trades only if PCR filter allows.
  • 12:00–14:00: Watch OI breakthrough near max OI strikes.
  • 15:00: Stop new entries. Square off by 15:15.
  • Evening: Log trades, review what chain signals fired.

Python: Mini Intraday Signal Engine

A compact combining of all five filters:

def intraday_signal(spot, vwap_val, orb_high, orb_low, pcr,
                    max_call, max_put, call_oi_chg, put_oi_chg):
    # ORB
    if spot > orb_high + 5 and pcr >= 0.7:
        if spot > max_call and call_oi_chg < 0:
            return "STRONG LONG (ORB + OI breakthrough)"
        return "LONG (ORB)"
    if spot < orb_low - 5 and pcr <= 1.4:
        if spot < max_put and put_oi_chg < 0:
            return "STRONG SHORT (ORB + OI breakthrough)"
        return "SHORT (ORB)"
    if spot > vwap_val:
        return "NEUTRAL-BULLISH (above VWAP)"
    return "NO TRADE / RANGE"

print(intraday_signal(
    spot=24100, vwap_val=24060, orb_high=24080, orb_low=24020,
    pcr=1.05, max_call=24050, max_put=23950,
    call_oi_chg=-12000, put_oi_chg=0))
Enter fullscreen mode Exit fullscreen mode

Run on any platform:

python3 intraday_signal.py    # Mac/Linux/Termux
py intraday_signal.py         # Windows CMD
Enter fullscreen mode Exit fullscreen mode

Realistic Indian Context

During 2024–2025, Nifty daily ranges often spanned 100–250 points on normal days and 300+ on event days. Zerodha and Dhan both offer 1-min and 5-min charts with VWAP built in. For API users, Dhan's historical + live feed lets you backtest these strategies in Python (pandas/numpy). SEBI's tighter F&O framework means margins are higher now, so position size accordingly — a single Nifty future lot notional is ~₹18–20 lakh, needing ~₹1.2–1.5 lakh margin.

Backtesting Your Intraday Nifty Strategy in Python

Before risking a rupee, backtest. With Dhan or Zerodha historical data (1-min or 5-min candles), you can replay these setups over months of Nifty data and measure win rate, average profit/loss, and max drawdown. Here is a minimal ORB backtest skeleton:

#!/usr/bin/env python3
"""Minimal ORB backtest on Nifty 5-min candles (CSV with columns: time,open,high,low,close)."""
import pandas as pd

def backtest_orb(df, orb_minutes=3, buffer=5, tp=40, sl=25):
    df = df.reset_index(drop=True)
    results = []
    for i in range(len(df) - orb_minutes - 1):
        orb = df.iloc[i:i+orb_minutes]
        rng_high, rng_low = orb['high'].max(), orb['low'].min()
        for j in range(i+orb_minutes, len(df)):
            row = df.iloc[j]
            if row['high'] > rng_high + buffer:
                pnl = min(tp, (row['close'] - rng_high)) if row['close'] >= rng_high else -sl
                results.append(pnl); break
            if row['low'] < rng_low - buffer:
                pnl = min(tp, (rng_low - row['close'])) if row['close'] <= rng_low else -sl
                results.append(pnl); break
    wins = sum(1 for r in results if r > 0)
    total = sum(results)
    print(f"Trades: {len(results)}  Wins: {wins}  Win%: {wins/len(results)*100:.1f}")
    print(f"Net points: {total:.0f}  Avg/trade: {total/len(results):.1f}")
    return results

# df = pd.read_csv("nifty_5min.csv")
# backtest_orb(df)
Enter fullscreen mode Exit fullscreen mode

This skeleton is intentionally simple — expand it with the PCR and OI filters, transaction costs, and slippage for realistic results. A strategy that survives costs and shows a positive expectancy over 60+ days of data is worth trading live in small size.

Position Sizing Calculator

Discipline is math. Use this to size every intraday trade so a stop-out never threatens your account:

def lot_size_for_risk(capital, risk_pct, stop_points, index_points_per_lot=75):
    risk_rs = capital * (risk_pct / 100)
    risk_per_lot = stop_points * index_points_per_lot
    lots = risk_rs // risk_per_lot
    return int(lots), risk_rs

# Example: 2 lakh capital, 1% risk, 30-point stop
print(lot_size_for_risk(200000, 1, 30))   # (0, 2000.0) -> 1 lot if margin allows
Enter fullscreen mode Exit fullscreen mode

For futures, also confirm you have the required SPAN margin; for options, compute premium risk instead. Never let a single trade exceed 2% of capital.

Zerodha vs Dhan: Practical Setup

  • Zerodha Kite: Excellent charts, VWAP and ORB indicators built in, strong reliability, large community. Kite Connect API is mature for automation.
  • Dhan: TradingView-powered charts, slick UI, developer-friendly API, good for option-chain-driven strategies and quick alerts. The Python snippets above pair naturally with Dhan's data API.

Both are SEBI-registered and support Nifty F&O. Pick based on which UI you find faster; the strategies are identical across platforms.

Trading Psychology for Intraday

The hardest part is not the setup — it is sitting on your hands. Intraday Nifty tests patience:

  • FOMO: Seeing Nifty rip 100 points without you. Solution: there is always another setup; chasing late entries is how stops get hit.
  • Revenge: One loss → double size to "recover." Solution: daily loss limit kills this automatically.
  • Overtrading: 8 trades when plan said 3. Solution: log every trade; review count weekly.
  • Confirmation bias: Ignoring PCR because "I feel bullish." Solution: let the filter block you.

A calm, process-driven mind outperforms a brilliant but emotional one. Trade the system, not the feeling.

Weekly Preparation Routine

  • Sunday: Review Nifty weekly chart, mark major support/resistance, note upcoming events (RBI, US Fed, results).
  • Mon–Thu: Run the daily routine from the sample day above; keep a journal of which signal fired.
  • Friday: Weekly review — win rate per strategy, biggest mistake, one improvement for next week.

Over a month, this journal becomes your personal edge map.

Common Mistakes

  • Trading ORB in the first 5 minutes (fakeout city).
  • Ignoring PCR and fighting sentiment.
  • No daily loss limit → revenge trading.
  • Holding into 3:30 with hopes (theta/gamma wreck options).
  • Over-leveraging because margin "looks cheap."
  • Skipping backtest and trading "live hope."
  • Trading every day regardless of setup quality — some days the right call is no trade.

Frequently Asked Questions

Q1. Which is the best intraday Nifty strategy for beginners?
Start with VWAP trend-following and ORB. They are visual and rule-based. Add the PCR filter once you are comfortable reading the option chain. Avoid OI breakthrough until you understand OI semantics.

Q2. How much capital do I need for intraday Nifty?
For one Nifty future lot you need ~₹1.2–1.5 lakh margin. For options, a few thousand per lot of premium. Realistically, ₹1–2 lakh lets you trade futures with proper risk; options can start lower but size carefully.

Q3. Can I automate these strategies?
Yes. Dhan and Zerodha provide APIs. Fetch candles + option chain via Python, compute signals, and place orders programmatically. Start with paper/semi-auto (alert → manual confirm) before full auto.

Q4. Is intraday Nifty trading profitable?
It can be, but SEBI data shows most retail F&O traders lose money. Profitability comes from strict risk rules, a tested edge (like the 5 setups here), and emotional discipline — not from "tips."

Q5. What time frame charts should I use?
5-minute for ORB and VWAP context, 1-minute for precise entries, and the option chain (live) for OI/PCR. Avoid sub-1-minute noise unless scalping.

Final Words

These 5 intraday trading Nifty strategies — VWAP, ORB, PCR filter, pre-open gap, OI breakthrough — give you a complete, data-driven playbook. None works in isolation every day; their power is in combination and in the risk rules that keep you alive. Build the Python snippets, backtest on historical data from Dhan/Zerodha, paper trade, then scale. The market rewards preparation, not prediction.


Shakti Tiwari is a Nifty option trader and AI builder at optiontradingwithai.in. Find more at dev.to/@shaktitiwari715-ai.

Top comments (0)