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
The modules use a 20-period simple moving average, a five-period RSI, Bollinger Band squeezes, a simplified prior-bar break, stacked exponential moving averages, Tenkan and Kijun alignment, and a mean-reversion band around a 20-period average. Enabled votes add fixed strength scores, and a minimum strength setting filters entries. Percent take-profit and stop-loss inputs are provided, with size set to full equity. The shown code ends before the order logic.
The inputs you can change from the gear icon on the chart. Defaults are the author's.
Setting
Type
Default
Variable
Enable MULTI_STRATEGY
bool
true
enable_multi_strategy
Enable RSI5_MOMENTUM
bool
true
enable_rsi5_momentum
Enable BOLLINGER_SQUEEZE
bool
true
enable_bollinger_squeeze
Enable CUSUM_TRIPLE_BARRIER
bool
true
enable_cusum_triple_barrier
Enable TRIPLE_EMA
bool
true
enable_triple_ema
Enable ICHIMOKU_CLOUD
bool
true
enable_ichimoku_cloud
Enable MEAN_REVERSION
bool
true
enable_mean_reversion
Take Profit %
float
2.0
tp_percent
Stop Loss %
float
1.0
sl_percent
Minimum Strength
int
2
strength_threshold
ATR Length
int
14
atr_length
ATR Multiplier
float
1.5
atr_multiplier
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.
This mean-reversion strategy combines multi-timeframe exponential moving averages, Bollinger Bands, and the Relative Strength Index. It generates long and optional short trade signals when price interacts with the Bollinger Bands alongside RSI threshold confir
This strategy plots a simple moving average basis and upper and lower Bollinger bands on the price chart, with a fill between the bands. It also calculates RSI. It opens one long trade when RSI is above 25, price is at or below the lower band, and no position
BB RSI Strategy combines Bollinger Bands, RSI, and multiple simple moving averages directly on the main price chart. It enters long positions when price drops below the lower Bollinger Band while RSI is below a set limit, and enters short positions when price
This strategy executes mean-reversion trades by combining RSI momentum, Bollinger Bands volatility, dynamic ATR stops, and Exponential Moving Averages for trend filtering. It seeks entry opportunities when price reaches extreme Bollinger Band boundaries alongs
Calculates a reversal confidence score combining Bollinger Band overextension, RSI exhaustion, and price distance from a exponential moving average. The strategy overlays VWAP, EMA, and Bollinger Bands directly on the price chart. Long signals trigger when pri
This strategy plots an anchored volume-weighted average price and two standard-deviation bands on the price chart. It buys dips below the inner band when a short RSI is oversold and an optional EMA trend filter agrees, and it can sell rallies above the inner b