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
When ADX is above the threshold it buys on a fast EMA crossing above a slow EMA, and when ADX is below it buys on RSI under 30. It closes the long on the opposite EMA cross in trend mode or on RSI over 70 in range mode. There is no stop loss. It plots both EMAs, shades the regime in the background and marks buys and sells.
The inputs you can change from the gear icon on the chart. Defaults are the author's.
Setting
Type
Default
Variable
ADX Period
int
14
adx_period
ADX Trend Threshold
int
25
adx_threshold
RSI Period
int
14
rsi_period
EMA Fast (Trend Mode)
int
8
ema_fast
EMA Slow (Trend Mode)
int
21
ema_slow
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 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
Inspired by Linda Raschke's strategy for T-note futures, this script identifies extended trends where price remains on one side of a 5-period SMA for more than eight consecutive bars. It enters long on the first pullback below the SMA following an eight-bar bu
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 identifies long entry opportunities based on short-term price pullbacks below a major trend filter. It enters long when three consecutive lower closes occur below the 200-period simple moving average, followed by the current bar closing back abov
This strategy evaluates market trend direction using a Noro TrendRibbon and creates a price corridor based on recent moving-average extremes, plotting directly on the price chart. It executes long entries when price dips below the corridor during an upward tre
This strategy overlays volume-weighted average price deviation bands and an exponential moving average trend filter directly on the price chart. It enters long positions during an uptrend when price recovers above the lower band, and enters short positions in