NIFTY Trend-Pullback Options System: Intraday: Rules-based · Long calls and puts

NIFTY Options Intraday Trading Strategy
Rule-based trading plan · NSE India

NIFTY Options Intraday Trading System

A trend-following pullback strategy for intraday NIFTY call (CE) and put (PE) buying, with defined entry conditions, risk controls, position sizing, and a Python backtesting blueprint.

Important: This is a strategy framework to test, not a live trading signal or a promise of profitability. Options can lose the entire premium paid.

Risk per trade0.25%Starting test setting
Daily loss limit0.75%Of trading capital
Maximum trades3/dayIncluding re-entries
Target / risk1.5 : 1Minimum planned ratio
Market context: Sunday, October 18, 2026, is not a regular NSE trading session. The prior session's levels are historical references only. Re-check the exchange calendar, live prices, opening gap, volatility, and fresh price action before trading the next session.

1. Strategy overview and market bias

The system combines trend direction, VWAP, momentum and a price-action confirmation. It should only trade when conditions align. A positive previous close by itself is not a reason to buy calls.

Reference from Friday, October 16, 2026NIFTY 50
High23,149.85
Low22,913.80
Close23,146.15

These levels are historical references, not forecasts or guaranteed support/resistance. Verify them against a trusted exchange or broker data feed before use.

2. Entry rules

Buy a CALL (CE)

  1. Wait until at least 9:30 AM IST.
  2. On the 15-minute chart, EMA 20 must be above EMA 50.
  3. NIFTY must be above VWAP on the 5-minute chart.
  4. ADX(14) on the 15-minute chart must be above 18 and rising.
  5. RSI(14) on the 5-minute chart must be between 52 and 68.
  6. Wait for a pullback toward VWAP or EMA 20, then a bullish 5-minute confirmation candle.
  7. Enter only after the confirmation candle's high is broken; avoid chasing an extended candle.

Contract: liquid ATM or one-strike ITM CE.

Buy a PUT (PE)

  1. Wait until at least 9:30 AM IST.
  2. On the 15-minute chart, EMA 20 must be below EMA 50.
  3. NIFTY must be below VWAP on the 5-minute chart.
  4. ADX(14) on the 15-minute chart must be above 18 and rising.
  5. RSI(14) on the 5-minute chart must be between 32 and 48.
  6. Wait for a pullback toward VWAP or EMA 20, then a bearish 5-minute confirmation candle.
  7. Enter only after the confirmation candle's low is broken.

Contract: liquid ATM or one-strike ITM PE.

3. Stop-loss, targets and trade limits

RuleInitial parameter to test
Initial premium stop20–25% below entry premium
Profit target1.5 times initial premium risk
Trailing stopAfter +1R, trail using underlying swing levels or a tested ATR rule
Underlying invalidationExit if the setup's invalidation level breaks, even if the premium stop has not triggered
New-entry cutoffDo not initiate trades after 2:30 PM IST
Intraday exitClose open positions by 3:15 PM IST
Daily disciplineStop after 2 consecutive losses or the daily loss limit
Trade frequencyMaximum 3 trades per session
A stop order can fill at a worse price during fast markets or gaps. Do not widen a stop to avoid booking a loss. Initially exclude expiry-day trading and test it separately only after the base system is validated.

4. Position-sizing calculator

Set capital, risk, option premium, stop percentage and the current contract lot size. The lot size must be checked with your broker or the current NSE contract master.

Risk budget₹1,250
Risk per lot₹3,250
Maximum lots₹0
Planned target per lot at 1.5R₹4,875

Calculation excludes charges, slippage and stop execution risk.

Formula:

  • Risk budget = capital × risk percentage.
  • Risk per lot = entry premium × stop-loss percentage × lot size.
  • Maximum lots = floor(risk budget ÷ risk per lot).

Example: ₹5,00,000 capital at 0.25% risk gives a ₹1,250 risk budget. If premium is ₹200, the stop is 25%, and lot size is 65, theoretical risk is ₹3,250 per lot—so the correct position is no trade at that risk limit.

5. Filters before every trade

FilterRule
Market timingNo entries in the first 15 minutes; wait until 9:30 AM.
Trend15-minute EMA alignment and 5-minute VWAP agreement.
MomentumADX above 18 and rising; RSI in the direction-specific range.
LiquidityPrefer liquid strikes with a tight bid–ask spread.
Contract selectionATM or one-strike ITM; avoid illiquid contracts and verify expiry.
VolatilityCheck India VIX and option IV; avoid buying expensive premium without a strong setup.
Gap riskAfter a large overnight gap, wait for a fresh range and confirmation.
NewsAvoid entering immediately before major scheduled announcements.
Risk limitMaximum 3 trades, stop after 2 consecutive losses or the daily loss cap.
ExpiryExclude expiry-day trades from the first version of the system.

6. Python backtesting plan

A meaningful backtest needs historical option prices—not just NIFTY spot signals. Correctly predicting index direction can still lose money due to premium decay, implied-volatility changes, bid–ask spreads, slippage and charges.

NIFTY 5-minute and 15-minute OHLCV data
↓
Calculate EMA, VWAP, RSI, ADX and ATR
↓
Generate CE / PE signals without look-ahead bias
↓
Match timestamps to actual option contract prices
↓
Simulate entries, stops, targets, charges and slippage
↓
Evaluate out-of-sample results and drawdown

Step 1: Collect the data

  • NIFTY spot or futures candles at 5-minute and 15-minute intervals.
  • Historical CE/PE option candles with OHLC and volume; bid–ask quotes are preferable.
  • Historical expiry, strike, lot size and contract metadata.
  • Brokerage, exchange charges, STT, GST and realistic slippage assumptions.

Use your broker's historical-data API or a licensed data provider. Check coverage, timestamps and contract adjustments before relying on the results.

Step 2: Generate starter signals

The following code is a signal-generation starting point. It expects a 5-minute DataFrame indexed by timestamp and the listed indicator columns. The 15-minute indicators must be aligned so only completed 15-minute candles are used. It is not a complete backtester or a live trading bot.

import numpy as np
import pandas as pd


def generate_signals(df):
    """
    Required columns:
      open, high, low, close, volume, vwap,
      ema20_15m, ema50_15m, adx_15m, rsi_5m

    Input is 5-minute data indexed by timestamp.
    Indicators must be calculated and aligned without
    look-ahead bias. Add a pullback condition before live use.
    """
    df = df.copy()

    bullish = (
        (df["ema20_15m"] > df["ema50_15m"]) &
        (df["close"] > df["vwap"]) &
        (df["adx_15m"] > 18) &
        (df["rsi_5m"].between(52, 68))
    )

    bearish = (
        (df["ema20_15m"] < df["ema50_15m"]) &
        (df["close"] < df["vwap"]) &
        (df["adx_15m"] > 18) &
        (df["rsi_5m"].between(32, 48))
    )

    prev_high = df["high"].shift(1)
    prev_low = df["low"].shift(1)

    bullish_confirmation = df["close"] > prev_high
    bearish_confirmation = df["close"] < prev_low

    minutes = df.index.hour * 60 + df.index.minute
    allowed_time = (
        (minutes >= 9 * 60 + 30) &
        (minutes <= 14 * 60 + 30)
    )

    df["buy_ce"] = (
        bullish & bullish_confirmation & allowed_time
    )
    df["buy_pe"] = (
        bearish & bearish_confirmation & allowed_time
    )

    return df


def position_size(
    capital, risk_fraction, entry_premium,
    stop_fraction, lot_size
):
    """Return risk budget, risk per lot and maximum lots."""
    risk_budget = capital * risk_fraction
    risk_per_lot = (
        entry_premium * stop_fraction * lot_size
    )

    if risk_per_lot <= 0:
        return risk_budget, risk_per_lot, 0

    lots = int(risk_budget // risk_per_lot)
    return risk_budget, risk_per_lot, lots

Step 3: Simulate actual option trades

  1. Select the nearest eligible ATM or one-strike ITM contract for each signal.
  2. Enter at the next executable option price, not the underlying candle's closing price.
  3. Track the actual option premium after entry.
  4. Exit when the premium stop, target, underlying invalidation or time exit is triggered.
  5. If stop and target are both touched in the same candle and their order is unknown, conservatively assume the stop was hit first.
  6. Deduct all applicable charges and slippage.
  7. Enforce position-size, maximum-trade and daily-loss limits during the simulation.

Step 4: Evaluate performance

MetricWhat to evaluate
Net profit after costsPositive performance across unseen periods.
Profit factorGross profits divided by gross losses.
Maximum drawdownWhether the worst peak-to-trough loss is tolerable.
Expectancy per tradeAverage net outcome per trade.
Win rate and average win/lossAssess together, not in isolation.
Trades per dayCheck for overtrading.
Performance by market regimeCompare trending, sideways and high-volatility periods.
Slippage sensitivityCheck whether small execution changes eliminate profitability.

Use at least 2–3 years of available data if possible, split chronologically into development, validation and untouched test periods. Start with a small number of parameters and use walk-forward validation to reduce overfitting.

7. Automation and deployment checklist

  • Build separate modules for data loading, indicator calculation, signal generation, contract selection, execution simulation and reporting.
  • For broker integration, add order-state tracking, duplicate-order protection, stale-data checks, exception handling and a kill switch.
  • Paper trade before risking capital; compare simulated fills with actual bid–ask prices.
  • Check current NSE, SEBI and broker requirements for retail algorithmic trading before automated order placement.
Recommended next step: Backtest the CE/PE trend-pullback system first, with conservative costs and one-lot sizing. Do not deploy it live unless it shows positive net expectancy on unseen data and acceptable drawdown.

Risk disclosure: This material is educational and is not investment advice. Options are leveraged instruments and may result in rapid or total loss of premium. Historical backtest results do not guarantee future performance. Verify all live market data, contract specifications, charges and regulatory requirements independently.

Comments

Popular posts from this blog

๐Ÿ“ˆ Opening Range Breakout Strategy Explained with Python Code

๐Ÿข Turtle Trading – Classic Breakout and Trend-Following Method (with Python)

๐Ÿ—ž️๐Ÿ’น News Sentiment Analysis – NLP-Based Headline Trading Using Python