OPEN-SOURCE SCRIPT

BankNifty 5min Supertrend Based Strategy

已更新
BankNifty 5min Supertrend Based Strategy, Intraday.

Work Best at 5mint chart on BankNifty.

The strategy is designed to trade using the Supertrend indicator with session-based rules, and risk management.It allows for customization through input variables and aims to provide a clear visual representation of the Supertrend by changing the color.

The script also includes input variables for the trading session and date range, which allows the trader to specify the time period in which they want the strategy to run. The session variable specifies the start and end times of the trading session, which in this case is set to the Indian trading session from 9:15 am to 3:10 pm.

The strategy starts by defining input variables such as the session time, start and end date for the backtesting, the length of the ATR, and the Supertrend factor. It also includes options for delay at session start and stop loss points and trail percentage.

The code then checks if the current time is within the specified session and date range. If it is, the Supertrend and its direction are calculated using the defined input variables. The strategy then waits for N numbers of candles (defined by the User) to form at the start of every session i.e. 09:15 AM before entering a trade.

The entry and exit conditions for long and short trades are defined based on the change in the Supertrend direction and the number of candles formed at the session start i.e. 09:15 AM. After that, it takes entry and exit for long and short trades on the change in the Supertrend direction. Stop-loss and trailing stop-loss are also defined based on the input variables.

Stop-loss(Defined by the user) is fixed points either below or above the Entry Price for Long and Short entries.

The Supertrend plot is displayed with changing colors depending on the direction. Finally, the strategy closes all trades at the end of the session if there are any open trades.

Overall, this strategy aims to trade with the Supertrend indicator using session-based rules and risk management.

However, as with any trading strategy, it is important to thoroughly test it before using it in live trading.
版本注释
BankNifty 5min Supertrend Based Strategy, Intraday.

Work Best at 5mint chart on BankNifty .

The strategy is designed to trade using the Supertrend indicator with session-based rules, and risk management. It allows for customization through input variables and aims to provide a clear visual representation of the Supertrend by changing the color.

The strategy is designed to trade using the Supertrend indicator with session-based rules, risk management, and changing the color.

The strategy starts by defining input variables such as the session time, start and end date for the backtesting, the length of the ATR, and the Supertrend factor. It also includes options for delay at session start and stop loss points and trail percentage.

The code then checks if the current time is within the specified session and date range. If it is, the Supertrend and its direction are calculated using the defined input variables. The strategy then waits for N numbers of candles(Defined by the user) to form at the start of every session before entering a trade.

The entry and exit conditions for long and short trades are defined based on the change in the Supertrend direction and the number of candles formed at the session start. Stop-loss and trailing stop-loss are also defined based on the input variables.

The Supertrend plot is displayed with changing colors depending on the direction. Finally, the strategy closes all trades at the end of the session if there are any open trades.

Overall, this strategy aims to trade with the Supertrend indicator using session-based rules and risk management.

However, as with any trading strategy, it is important to thoroughly test it before using it in live trading.
版本注释
You'll get a hint on how the strategy performed, at least in the past, although obviously there is no guarantee that it will make money in the future.
版本注释
Updates to this strategy
  • Stop-loss is improved (fixed Points)
    Added Target Profit/Points
    Added option to take ReEntry in the supertrend direction after hitting Sl/TG/TSl.


This strategy Shows good results in the futures.
Always Remember
the strategy performed, at least in the past, although obviously there is no guarantee that it will make money in the future.
版本注释
Always Future Test (Paper Trade) the new strategy
版本注释
apply to chart
5minuteschartbankniftytradesetupbankniftytradingintradaysupertrendTrend Analysis

开源脚本

本着真正的TradingView精神,此脚本的作者已将其开源,以便交易者可以理解和验证它。向作者致敬!您可以免费使用它,但在出版物中重复使用此代码受网站规则约束。 您可以收藏它以在图表上使用。

想在图表上使用此脚本?

免责声明