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
MEMA + BB + RSI [Alorse] generates long and optional short trade signals when price interacts with the Bollinger Bands alongside RSI threshold confirmations and moving average alignments. The strategy plots Bollinger Bands directly on the price chart. Users can configure timeframes and lengths for both EMAs, Bollinger Band parameters, RSI thresholds, and toggle percentage-based stop-loss, take-profit, or bar-count exits. Stop loss and take profit are disabled by default.
Multi-timeframe exponential moving average filters
Bollinger Bands overlay for mean-reversion signals
Relative Strength Index momentum filtering
Configurable percentage stop-loss and take-profit targets
Optional time-based exit after a fixed number of bars
The inputs you can change from the gear icon on the chart. Defaults are the author's.
Setting
Type
Default
Variable
Version
string
txtVer
version
Source
source
close
src
Periods
int
10
ma1
Timeframe
timeframe
1D
res1
Periods
int
55
ma2
Timeframe
timeframe
1D
res2
╔═════ Show Bollinger Bands ═════╗
bool
true
isBB
Length
int
20
length
StdDev
float
2.0
mult
Offset
int
0
offset
Length
int
14
lenRSI
Oversold
int
71
oversold
Show all 20 settings
Setting
Type
Default
Variable
Long entries
bool
true
showLong
Short entries
bool
false
showShort
Close after X # bars
bool
false
closeAfterXBars
# bars
int
12
xBars
╔══════ Enable ══════╗
bool
false
useSL
Percent
float
10
SLPercent
╔══════ Enable ══════╗
bool
false
useTP
Percent
float
10
TPPercent
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 strategy combines Bollinger Bands, Bollinger Band Width, and the Relative Strength Index (RSI) for mean-reversion trades. It enters long when price crosses below the lower band with oversold RSI, or when band width contracts under low volatility. Short en
The Mean Reversion Strategy Template calculates a baseline mean using SMA, EMA, or VWAP alongside upper and lower deviation bands based on standard deviation, ATR, or percentage offsets. It generates long and short entries when price touches, bounces from, or
This strategy identifies trend-following entries using a triple exponential moving average alignment and ATR-based exits on the main price chart. Long signals trigger when the fast EMA is above the medium EMA and medium is above slow, accompanied by a close ab
This strategy generates buy and sell signals based on Bollinger Band crossovers combined with a simple moving average trend filter. It enters a long position when price crosses above the lower band while trading above the SMA filter line, and enters a short po
This strategy combines Bollinger Bands with a short RSI to fade moves that leave the bands and then return. A long requires the prior bar below the lower band and oversold, then a close back inside the band while RSI is between 30 and 50. Shorts mirror that at
This educational strategy demonstrates moving average crossovers filtered by RSI momentum, incorporating ATR-based risk management. It calculates a 10-period SMA, a 30-period SMA, a 14-period RSI, and a 14-period ATR. Long entries trigger when the fast SMA cro