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
Entries are verified through optional filters, including a 233 EMA trend filter, ATR volatility threshold, volume multiplier confirmation, RSI bounds, MACD direction, and trading session hours. Exits are controlled by customizable take-profit percentages and either swing-based or fixed percentage stop losses, with an optional 1:1 risk-to-reward mode. Plots swing high and low levels on the main price chart alongside optional MACD pane outputs.
Swing high and low breakout entry signals
Configurable swing-based or fixed percentage stop loss
Trend, volatility, volume, RSI, and MACD entry filters
The inputs you can change from the gear icon on the chart. Defaults are the author's.
Setting
Type
Default
Variable
Swing Window
int
20
swingWindow
Trading Direction
string
both
direction
Take Profit (%)
float
1.0
tpPercent
Stop Loss Type
string
Swing SL
slType
Fixed SL (%)
float
1.0
fixedSlPercent
Use 1:1 Risk-Reward (TP = SL)
bool
false
useRR1
Use 233 EMA Filter (Other Pairs)
bool
true
useEMAFilter
Use 233 EMA Filter (BTC Only)
bool
true
useEMAFilterBTC
Use ATR Volatility Filter
bool
false
useATRFilter
ATR Period
int
14
atrPeriod
Min ATR (% of price)
float
0.5
minAtr
Use Volume Filter
bool
false
useVolumeFilter
Show all 23 settings
Setting
Type
Default
Variable
Volume Multiplier
float
1.2
volMultiplier
Use Session/Time Filter
bool
false
useSessionFilter
Start Hour (UTC)
int
8
startHour
End Hour (UTC)
int
20
endHour
Use RSI Filter
bool
false
useRSIFilter
RSI Period
int
14
rsiPeriod
Use MACD Filter
bool
false
useMACDFilter
Plot MACD on Chart
bool
false
plotMACD
MACD Fast Length
int
12
macdFastLength
MACD Slow Length
int
26
macdSlowLength
MACD Signal Length
int
9
macdSignalLength
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 trades Donchian channel breakouts on the price chart and exits on a shorter Donchian channel. It sizes each unit from a percentage of equity and an ATR-based initial stop, then adds units as price moves a set ATR distance, up to a maximum unit co
Implements a rule-based momentum trading strategy that detects Bollinger Band challenges followed by synchronized trendline or range breakouts on the price chart. Entries trigger under configurable strictness modes using multi-timeframe Tide and Wave alignment
This strategy enters multi-order long positions during volatility expansions when price breaks above the upper Bollinger Band. Entries require price alignment above Parabolic SAR, a 100 EMA, and a 200 EMA trend filter, alongside mid-range RSI and elevated ATR.
This strategy evaluates multi-factor breakout confluence using a customized scoring system on the price chart. It checks Minervini-style Volatility Contraction Pattern trend templates, TTM squeeze volatility compression, volume dry-up with OBV accumulation, mo
This strategy identifies breakouts using Keltner Channels combined with volume spike filters, ADX trend strength, RSI thresholds, and an optional EMA trend direction filter. It triggers long entries when price crosses above the upper channel and short entries
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