All indicators

BankNifty 5min Supertrend Based Strategy

Mar 8, 2023

Static chart image
SignalsTime BasedMoney ManagementTrailing-StopVolatility

The BankNifty 5min Supertrend Based Strategy indicator is a comprehensive intraday trading tool designed to execute trades based on Supertrend crossovers within specific session parameters and robust risk management rules.

Usage

The strategy is optimized for the 5-minute timeframe on the BankNifty index. It utilizes a Supertrend calculation to determine trend direction and generates entry signals when the trend flips or after a user-defined candle delay at the start of the session.

Traders can use this tool to:

  • Session-Based Trading: Define a specific window (e.g., the Indian trading session from 09:15 to 15:10) to restrict execution to high-liquidity periods.
  • Delayed Entry: Wait for a specific number of candles to form at the session open before allowing the strategy to take positions, helping to avoid initial market volatility.
  • Risk Management: Apply fixed-point stop losses, take profits, and trailing stop percentages to protect capital automatically.
  • Automated Exits: Ensure all positions are flattened at the end of the specified trading session.

Details

The strategy calculates the Supertrend using a default 50-period ATR and a 3.0 factor. It tracks the number of candles formed since the start of the session to manage the delay filter. For entries, the script checks if the current time is within the user-defined date range and session hours.

If the delay condition is met, a Long entry is triggered when the Supertrend direction turns bullish (direction < 0), and a Short entry is triggered when it turns bearish (direction > 0). The script uses the strategy.exit function to handle complex exit logic including trailing stops, while also monitoring fixed price targets and trend reversals for standard exits.

Settings

Indian Session Time

  • Session: Defines the active trading hours (e.g., 0915-1510).
  • Start Date: The beginning timestamp for backtesting or execution.
  • End Date: The concluding timestamp for backtesting or execution.

SuperTrend Setting

  • ATR Length: The lookback period for the Average True Range calculation.
  • Factor: The multiplier applied to the ATR to determine the Supertrend distance from price.

Delay at Session Start

  • Use Delay?: Toggles the requirement to wait for a specific number of candles at market open.
  • Delay N numbers of candle: The specific count of 5-minute candles to wait before trading starts.
  • Take ReEntry After Delay/SL/Target?: Determines if the strategy can re-enter a position within the same session after an exit.

Fixed Point SL/TG

  • Use Stoploss Fixed Points?: Enables a fixed point-based stop loss from the entry price.
  • Stop Loss Fixed Points: The distance in points for the stop loss.
  • Use Target Fixed Points?: Enables a fixed point-based take profit.
  • Use Target Fixed Points: The distance in points for the target.

Trailing

  • Use Stoploss Trail?: Enables a percentage-based trailing stop.
  • Stop Loss Trail%: The percentage used to trail the stop loss behind the price.

FAQ

How do I use the BankNifty 5min Supertrend Based Strategy?

Apply the script to a 5-minute BankNifty chart and configure the session settings to match your local market hours, ensuring the ATR and Factor inputs align with your risk tolerance.

Can I customize the entry delay?

Yes, you can enable the "Use Delay" setting and specify exactly how many candles the strategy should ignore at the start of the session (e.g., waiting 10 candles means trading starts at 10:05 AM).

How can I access BankNifty 5min Supertrend Based Strategy?

You can get access on the LuxAlgo Library for charting platforms like TradingView, MetaTrader (MT4/MT5), and NinjaTrader for free.

Free indicator

Get free access to this indicator on the platforms below.

TradingView
NinjaTrader
MetaTrader 4/5

Unlock the entire LuxAlgo Library

Every indicator, every strategy, full charts, and complete access to Quant — our AI agent.