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
26 lines of Pine Script v4 from greeffer-bb-strategy.pine, published under MPL-2.0 (file header). Keep the author's credit and licence lines when you reuse it.
Greeffer BB Strategy opens a short when price crosses above the upper band and the 14-period RSI is above 75, and a long when price crosses below the lower band and RSI is above 25. Shorts close when RSI falls below 30 and longs close when RSI rises above 70. Position size defaults to a percent of equity. Length and band multiplier change the moving-average basis and band width. It plots equity in a separate pane and has no stop loss.
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