1Copy the scriptPress Copy script above, or the copy button on the code below.
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
27 lines of Pine Script v4 from greeffer-bb-strategy-1.pine, published under MPL-2.0 (file header). Keep the author's credit and licence lines when you reuse it.
Greeffer BB Strategy enters long positions when price crosses below the lower band with RSI above 30, and enters short positions when price crosses above the upper band with RSI above 70. Exits are triggered when RSI reaches opposing extremes. The strategy plots the portfolio equity curve in a separate chart pane. Input settings allow adjusting the band length and deviation multiplier. Note that pyramiding is enabled and there is no protective stop loss.
Bollinger Bands and RSI entry triggers
RSI threshold exit rules
Separate pane strategy equity plot
Adjustable length and standard deviation multiplier
The inputs you can change from the gear icon on the chart. Defaults are the author's.
Setting
Type
Default
Variable
length
int
20
length
mult
float
2.0
mult
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 combines Larry Williams' Vix Fix synthetic volatility indicator with Bollinger Bands. It calculates standard and inverted Williams Vix Fix metrics, displaying them as histogram columns with standard deviation bands in a separate pane. Long entrie
This strategy executes mean-reversion trades based on Bollinger Bands and the Stochastic Oscillator. Long orders trigger when price dips below the lower band alongside a bullish Stochastic crossover, with an optional oversold threshold. Short orders execute on
This strategy calculates a smoothed Relative Strength Index and plots self-adjusting linear regression bands with overbought and oversold boundaries in a separate pane. It enters long positions through dollar-cost averaging orders scaled across market phases a
This strategy plots the Williams Vix Fix indicator as a histogram in a separate pane to detect potential trend reversals. It calculates the Vix Fix value using a lookback period and standard deviation bands derived from Bollinger Bands on the Vix Fix. Multiple
This strategy calculates intraday volatility mean reversion using session VWAP standard deviation bands, RSI overbought and oversold levels, and candle wick exhaustion ratios. It enters trades when price reaches statistical extremes filtered by RSI and wick co
Calculates the Relative Strength Index (RSI) and wraps Bollinger Bands directly around the RSI series rather than price. It enters long positions when the RSI drops below its lower band and hooks back upward, and enters short positions when the RSI exceeds the