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
MP EMA 9/21 Pullback Continuation calculates dual exponential moving averages alongside an average directional index filter. Entries trigger when price pulls back into the moving-average zone and resumes, filtered by moving-average separation. Configurable inputs modify moving-average lengths, higher-timeframe filters, pullback depth limits, and stop modes. Positions use percent equity sizing with swing or average true range stops. Exits execute via partial profit-taking with breakeven stop movement and a trailing runner exit. Daily trade caps restrict executions, and setups cancel if pullbacks penetrate too deep.
The inputs you can change from the gear icon on the chart. Defaults are the author's.
Setting
Type
Default
Variable
Fast EMA
int
9
fastLen
Slow EMA
int
21
slowLen
Slope lookback
int
3
slopeLen
Higher timeframe filter
bool
true
useHtf
HTF
timeframe
60
htf
HTF EMA length
int
50
htfEmaLen
Require trending ADX
bool
true
useAdx
ADX length
int
14
adxLen
Min ADX
float
22.0
adxMin
Require EMA separation
bool
true
useSepar
Min 9/21 gap (ATR)
float
0.15
separAtr
Touch tolerance (ATR)
float
0.20
touchAtr
Show all 36 settings
Setting
Type
Default
Variable
Max pullback depth past slow EMA (ATR)
float
0.35
deepStop
Pullback expiry (bars)
int
12
armExpiry
Require close > prior high (long)
bool
false
needEngulf
Allow longs (bull)
bool
true
allowLong
Allow shorts (bear)
bool
true
allowShort
ATR length
int
14
atrLen
Stop placement
string
Swing
stopMode
ATR stop multiplier
float
1.5
atrStopMult
Swing stop buffer (ATR)
float
0.15
stopBuffer
TP1 at R multiple
float
1.0
tp1R
TP1 size %
int
50
tp1Pct
Runner exit
string
Chandelier
trailMode
TP2 at R multiple (Fixed R)
float
2.5
tp2R
Chandelier lookback
int
10
trailLen
Chandelier ATR mult
float
2.0
trailMult
Move stop to BE after TP1
bool
true
moveBe
Time stop (bars, 0=off)
int
0
maxBars
Max entries per day
int
5
maxPerDay
Restrict to session
bool
false
useSess
Session
session
0700-1600
sess
Timezone
string
Europe/London
sessTz
Show stats table
bool
true
showTable
Position
string
Top Right
tblPos
Text size
string
Small
tblSize
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 intraday strategy is designed for short-term scalping on equity and index markets like SPY. It evaluates price movement using configurable exponential and Hull moving averages combined with an ATR-based Supertrend calculation. The script plots signal arro
This mean-reversion strategy plots Bollinger Bands and a long-term moving average directly on the price chart. It enters trades when price candles penetrate the outer Bollinger Bands beyond a user-defined body percentage, anticipating a price reversal. Entries
This overlay strategy targets one-minute ES futures and plots volume-weighted moving-average bands from the open, scaled by a standard-deviation multiple, plus a slower band from ten-minute opens. A higher-timeframe exponential moving average can filter trades
STRG-BBForce is a Bollinger Bands trend-following strategy. It calculates standard Bollinger Bands and tracks directional alignment across the upper, lower, and basis lines. When all three lines slope upward, it opens a long position and closes short positions
This trading strategy combines three Exponential Moving Averages (8, 14, and 50 periods by default) with Stochastic RSI and Average True Range (ATR). It enters a long position when EMA 1 is above EMA 2, EMA 2 is above EMA 3, and the Stochastic RSI %K line cros
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