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.
1Copy the scriptPress Copy script above. It reads the file straight from GitHub.
2Open the Pine EditorOpen a TradingView chart and choose Pine Editor at the bottom of the screen.
3Paste over the templateCreate a new strategy, select all of the template text and paste. Press Save and give it a name.
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.
The inputs you can change from the gear icon on the chart. Defaults are the author's.
Setting
Type
Default
Variable
Strategy
string
Supertrend+EMA
strat_choice
Timeframe (D, 240, 60, 15, 5)
timeframe
D
tf
Trade Start (UTC, e.g. 345=3:45am)
int
345
trade_start
Trade End (UTC, e.g. 1000=10:00am)
int
1000
trade_end
Risk Per Trade (% of equity)
float
1.0
risk_percent
Max Drawdown % (stop trading)
float
25.0
max_dd_percent
ATR Multiplier for SL
float
2.0
atr_mult
ATR Length
int
14
atr_len
Use ATR-based Stop Loss?
bool
true
use_atr_sl
Fixed SL % (if ATR off)
float
1.0
fixed_sl_pct
Use Trailing Stop?
bool
true
use_trailing
Trail Activate (% profit)
float
1.5
trail_activate
Show all 29 settings
Setting
Type
Default
Variable
Trail Distance (%)
float
0.75
trail_dist
Supertrend ATR Period
int
10
st_atr
Supertrend Multiplier
float
3.0
st_mult
Fast EMA
int
6
ema_fast_len
Slow EMA
int
30
ema_slow_len
RSI Length
int
14
rsi_len
RSI Overbought
int
70
rsi_ob
RSI Oversold
int
30
rsi_os
MACD Fast
int
12
macd_fast
MACD Slow
int
26
macd_slow
MACD Signal
int
9
macd_sig
BB Length
int
20
bb_len
BB StdDev
float
2.0
bb_std
Max BB Width (squeeze)
float
0.3
bb_width
VWAP Timeframe
string
60
vwap_tf
VWAP Deviation
float
2.0
vwap_dev
Risk:Reward Ratio
float
2.0
tp_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.
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
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
This strategy combines a Simple Moving Average (SMA) and the Relative Strength Index (RSI) to generate long trading signals. It enters a long position when price closes above the SMA filter while RSI drops below the oversold threshold. The strategy exits the p
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.
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
Lucid 100K v5 is a Pine Script strategy for trading MES futures on 5-minute charts. It overlays buy and sell signals directly on the price chart. The strategy runs two phases based on equity and recent profit factor. Phase 1 uses trend pullback entries with EM