OPEN-SOURCE SCRIPT

Stochastic Bollinger Strategy

Updated
Bollinger defaults = 20, close, 2
Stochastic defaults = 13, 5, 5

Buy Signal (GREEN triangle):

  • BULLISH candle formed
  • Candle OPEN is LESS than LOWER Bollinger Band
  • Stochastic (K) is LESS than 20


Sell Signal (RED triangle):

  • BEARISH candle formed
  • Candle OPEN is GREATER than UPPER Bollinger Band
  • Stochastic (K) is GREATER than 80


Read more about the strategy and where to set buy stops and sell stops here: swing-trading-strategies.com/bollinger-band-swing-trading-system/
Release Notes
Added the ability to include/exclude reversal candles only. This setting is turned ON by default.

Example: In a Sell Signal, If Stochastic >= 80 AND the candle's OPEN >= UPPER Bollinger Band AND 'Include Reversal Candle Only' is NOT checked, then the candle's OPEN does NOT have to be GREATER than its CLOSE.

Vis Versa for Buy Signals

WHY? This allows you to get more signals from the indicator that a potential reversal is about to happen if it's NOT checked ( aka set to False), you potentially might get more fake outs though.
Release Notes
Bug Fix on last release.
Release Notes
Added the ability to set 1 alert that triggers for short and long, this allows you to only need to burn 1 alert rather than 2 for each pair since TV limits the amount of alerts you can set based on your membership level.
Release Notes
Added the functionality to allow you to set your upper and lower limits that the Stochastic needs to be above or below, respectively. The default is above 80 or below 20.
Release Notes
Added the following:

  • Ability to show Bollinger Bands w/ the indicator to save you using up an indicator on Bollinger Bands
  • Added the ability to show gray tiny triangles where the center Bollinger Band crosses through a candle*
  • You can also set up alerts to tell you when center Bollinger Band crosses through a candle so you don't have to watch the chart constantly**


*Reason: if you have entered a trade and then candles start crossing through the center Bollinger Band it's a good indication that the trend is about to reverse again and you may want to get out

**There is also an alert that will trigger when there is a short signal, a long signal, or center Bollinger Band is crosses through a candle (this allows you to set up 1 alert but really get 3 since TV limits the amount of alerts you can have)
Bollinger Bands (BB)bollingerbandstrategyMoving AveragesStochastic OscillatorTrend Analysis

Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in publication is governed by House rules. You can favorite it to use it on a chart.

Want to use this script on a chart?

Disclaimer