This strategy tracks market direction using an ATR-based trailing envelope similar to Supertrend, combined with Bollinger Bands, Keltner Channels, and momentum filters.
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
Long and short entry signals trigger on trend direction shifts within a specified backtest date window. Trades are managed with a built-in trailing stop loss. Visual elements include plotted trend lines, background highlighters, and buy or sell signal markers drawn in a separate pane.
Supertrend-style ATR trailing band calculation
Bollinger Bands and Keltner Channel volatility filters
Configurable fast and slow RSI momentum parameters
The inputs you can change from the gear icon on the chart. Defaults are the author's.
Setting
Type
Default
Variable
ATR Period
int
15
Periods
Source
source
hlc3
src
ATR Multiplier
float
4.0
Multiplier
Change ATR Calculation Method ?
bool
true
changeATR
Show Buy/Sell Signals ?
bool
false
showsignals
Highlighter On/Off ?
bool
true
highlighting
Bar Coloring On/Off ?
bool
true
barcoloring
From Month
int
3
FromMonth
From Day
int
1
FromDay
From Year
int
2021
FromYear
To Month
int
1
ToMonth
To Day
int
1
ToDay
Show all 29 settings
Setting
Type
Default
Variable
To Year
int
9999
ToYear
BB Length
int
14
length
BB MultFactor
float
2.0
mult
KC Length
int
17
lengthKC
KC MultFactor
float
1.5
mult_kc
Filter for Momenutum value
bool
false
useMomAverage
Min for momentum
int
20
MomentumMin
n1
int
4
n1
n2
int
21
n2
Length Fast RSI
int
5
len_fast
Length Slow RSI
int
14
len_slow
Over Bought Level 1
int
70
obLevel1
Over Bought Level 2
int
53
obLevel2
Over Sold Level 1
int
-70
osLevel1
Over Sold Level 2
int
-53
osLevel2
Trailing Stop Loss
int
5000
inpTrailStop
Trailing Stop Loss Offset
int
0
inpTrailOffset
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 captures strong bullish momentum by combining a 200-period SMA baseline, a custom Bollinger Band, the True Strength Index (TSI) smoothed with WMAs, and the ADX trend strength indicator. It initiates long positions when price is above the 200 SMA,
This strategy combines an EMA ribbon with MACD confirmation and plots in a separate pane. It enters when ribbon alignment, optional MACD zero or signal crosses, volume, smart-money, and multi-timeframe filters agree, then exits with percentage stop loss and ta
The WaveTrend v4 Strategy generates trading signals when the WaveTrend oscillator crosses at oversold or overbought levels. Long positions enter on bullish crosses in oversold territory, while short positions enter on bearish crosses in overbought territory. I
This strategy identifies high-volatility expansion bars by comparing the high-low range to a moving average plus standard deviation threshold. When range expansion occurs, it checks momentum over a specified lookback period. It opens a long position if the cur
Alt Coin BB SMA Strategy calculates custom MACD delta histogram values, Bollinger Bands, and middle band slopes to generate trading signals in a separate pane. It triggers long entry orders when the price crosses above the Bollinger middle band, provided the M
Sentiment 2 is a trend-following strategy that calculates a normalized composite market sentiment score ranging between 0 and 1. It combines exponential and Hull moving average slopes, high/low midpoints, Supertrend distances, and Parabolic SAR metrics. Plotte