Strategy · Pine Script v5 · On the chart

NSE Algo Trading System v1

by ArunTelegramBot

A strategy for Indian stocks that lets the user choose one of five rule sets: SuperTrend with an EMA, an EMA crossover, RSI with MACD, a Bollinger Band squeeze, or a VWAP pullback.

View on GitHub

GitHub stars1on the repository
Pine versionv5runs as is
Lines of code223
Settings29inputs
LicenceNone stated
Last update10 days ago19 Oct 2026

Add It to Your TradingView Chart

  1. 1Copy the scriptPress Copy script above. It reads the file straight from GitHub.
  2. 2Open the Pine EditorOpen a TradingView chart and choose Pine Editor at the bottom of the screen.
  3. 3Paste over the templateCreate a new strategy, select all of the template text and paste. Press Save and give it a name.
  4. 4Add it to the chartPress Add to chart. The trades and results appear in the Strategy Tester tab; adjust the settings with the gear icon.

Source Code

The code stays on GitHub. The author has not published this script under an open licence, so ForexR does not show its code. Copy script reads the file straight from GitHub into your clipboard, so you can still try it on your own chart. Ask the author before reusing the code anywhere else.

Overview

A time window in UTC limits trading to exchange hours. Risk management sizes by a percentage of equity, sets an ATR or fixed percentage stop, and can add a trailing stop after a profit threshold. Trading stops after a set drawdown, and take profit uses a risk-to-reward ratio.

Details

Published by

ArunTelegramBot on GitHub

Draws

On the price chart

Markets

Stocks

Timeframes

Any timeframe

Risk Notes

No repainting, lookahead or stacked entries were found in its code or README. That says nothing about how well it works: test it first.

Settings

The inputs you can change from the gear icon on the chart. Defaults are the author's.

SettingTypeDefaultVariable
StrategystringSupertrend+EMAstrat_choice
Timeframe (D, 240, 60, 15, 5)timeframeDtf
Trade Start (UTC, e.g. 345=3:45am)int345trade_start
Trade End (UTC, e.g. 1000=10:00am)int1000trade_end
Risk Per Trade (% of equity)float1.0risk_percent
Max Drawdown % (stop trading)float25.0max_dd_percent
ATR Multiplier for SLfloat2.0atr_mult
ATR Lengthint14atr_len
Use ATR-based Stop Loss?booltrueuse_atr_sl
Fixed SL % (if ATR off)float1.0fixed_sl_pct
Use Trailing Stop?booltrueuse_trailing
Trail Activate (% profit)float1.5trail_activate
Show all 29 settings
SettingTypeDefaultVariable
Trail Distance (%)float0.75trail_dist
Supertrend ATR Periodint10st_atr
Supertrend Multiplierfloat3.0st_mult
Fast EMAint6ema_fast_len
Slow EMAint30ema_slow_len
RSI Lengthint14rsi_len
RSI Overboughtint70rsi_ob
RSI Oversoldint30rsi_os
MACD Fastint12macd_fast
MACD Slowint26macd_slow
MACD Signalint9macd_sig
BB Lengthint20bb_len
BB StdDevfloat2.0bb_std
Max BB Width (squeeze)float0.3bb_width
VWAP Timeframestring60vwap_tf
VWAP Deviationfloat2.0vwap_dev
Risk:Reward Ratiofloat2.0tp_ratio
Third-party code. ForexR did not write, test or endorse this script, and the summary above was generated automatically from its code and README. Indicators describe the past, and a strategy's backtest can look better than live trading, especially when a script repaints. Check it in the Strategy Tester and on a demo account before you rely on it.

Similar Pine Scripts

285 stars

Mean Reversion Strategy is an overlay strategy that identifies pullbacks using a long-term EMA, RSI, and candlestick patterns. It generates long signals when a bullish engulfing candle forms below the EMA while RSI is oversold, and short signals when a bearish

Strategy v4 Mean reversionCandlestick patterns
Updated 3 years ago · None stated GitHub repository of Mean Reversion Strategy

ADX + RSI Strat

by hasnocool
106 stars

This strategy combines a 7-period RSI with an ADX filter to trade market regimes on the price chart. When the ADX indicates ranging conditions below a set threshold, it triggers entries on RSI overbought or oversold extremes. By default, the entry logic is inv

Strategy v4 Oscillators & momentumTrend
Updated 2 years ago · GPL-3.0 GitHub repository of ADX + RSI Strat

ADX Trend Filter

by latentwill
4 stars

This strategy enters long when a series labeled ADX is above a threshold and RSI is below 40, and enters short when that series is above the threshold and RSI is above 60. Both series are calculated with the RSI function, so the trend filter is not a true ADX.

Strategy v5 TrendOscillators & momentum
Updated 7 days ago · None stated GitHub repository of ADX Trend Filter
4 stars

This strategy trades pullbacks in the direction of a moving-average trend and draws on the price chart. An uptrend requires the 50-period EMA above the 200-period EMA with price above the slower average, and a downtrend is the reverse. It enters long or short

Strategy v6 TrendOscillators & momentum
Updated yesterday · None stated GitHub repository of AG Trend-Pullback Optimized

More Trend scripts

Related on ForexR

Trade Your Charts With a Regulated Broker

Compare brokers that connect to TradingView, with spreads, minimum deposits and leverage side by side.

Compare brokers