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
Filters include a higher timeframe trend and RSI check, a volume breakout test, a volatility regime check and a trend strength check, plus an optional session window. Position size can follow a Kelly-style calculation capped at a maximum percentage, or a risk per trade. Stops are ATR-based or fixed percentage, targets use a risk-reward ratio, a trailing stop is available and pyramiding is off by default.
The inputs you can change from the gear icon on the chart. Defaults are the author's.
Setting
Type
Default
Variable
RSI Period
int
14
rsiLength
RSI Smoothing
int
3
rsiSmoothing
RSI Overbought Level
float
72.5
rsiOverbought
RSI Oversold Level
float
27.5
rsiOversold
BB Period
int
21
bbLength
BB Standard Deviation
float
2.1
bbStdDev
Adaptive BB (ATR-based)
bool
true
bbAdaptive
Higher Timeframe Multiplier
int
4
htfMultiplier
Use HTF Trend Filter
bool
true
useHTFTrend
Use HTF RSI Confirmation
bool
true
useHTFRSI
Volume Breakout Filter
bool
true
volumeFilter
Volume Threshold
float
1.5
volumeMultiplier
Show all 32 settings
Setting
Type
Default
Variable
Volatility Regime Filter
bool
true
volatilityFilter
Trend Strength Filter
bool
true
trendStrengthFilter
Kelly Criterion Position Sizing
bool
true
useKellyCriterion
Maximum Position Size (%)
float
35.0
maxPositionSize
Risk Per Trade (%)
float
1.5
riskPerTrade
Enable Pyramiding
bool
false
pyramidingEnabled
Max Pyramid Levels
int
2
maxPyramidLevels
Stop Loss Mode
string
ATR
stopLossMode
ATR Stop Loss Multiplier
float
2.5
stopLossATR
Fixed Stop Loss (%)
float
3.0
stopLossFixed
Take Profit Mode
string
Dynamic
takeProfitMode
Risk:Reward Ratio
float
2.5
takeProfitRatio
Trailing Stop ATR Offset
float
1.8
trailingStopOffset
Market Regime Detection
bool
true
enableRegimeFilter
Trend Detection Period
int
50
trendPeriod
Volatility Regime Period
int
20
volatilityPeriod
Enable Session Filter
bool
false
useSessionFilter
Trading Session
session
0930-1600
sessionStart
Avoid High-Impact News
bool
true
avoidNewsTime
Friday Position Close Hour
int
15
fridayCloseHour
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.
Alert BB + RSI [Alorse] is a multi-symbol mean-reversion strategy designed for cryptocurrency trading. It evaluates Bollinger Bands and the Relative Strength Index (RSI) across up to 20 user-defined ticker symbols simultaneously. The strategy enters long posit
A multi-timeframe Dollar Cost Averaging (DCA) trading strategy that combines signals from three RSI indicators, three CCI indicators, and Bollinger Bands. It places up to five weighted scale-in safety orders to lower the average entry price. The script offers
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
Greeffer RSI Strategy is a trading strategy that generates buy and sell entries based on Bollinger Bands and RSI levels. It places stop orders at upper and lower Bollinger Bands on band crossovers, and adds positions when RSI reaches extreme levels. Users can
This strategy overlays the price chart to trade DAX futures during European market hours. It calculates exponential and simple moving averages, RSI, MACD, Bollinger Bands, ATR, and realized volatility to simulate VIX levels. Trades execute when session time fi
This strategy plots a simple moving average basis and upper and lower Bollinger bands on the price chart, with a fill between the bands. It also calculates RSI. It opens one long trade when RSI is above 25, price is at or below the lower band, and no position