OPEN-SOURCE SCRIPT

Bollinger Band Wick and SRSI Signals [MW]

Introduction
This indicator uses a novel combination of Bollinger Bands, candle wicks crossing the upper and lower Bollinger Bands and baseline, and combines them with the Stochastic SRSI oscillator to provide early BUY and SELL signals in uptrends, downtrends, and in ranging price conditions.


How it’s unique
People generally understand Bollinger Bands and Keltner Channels. Buy at the bottom band, sell at the top band. However, because the bands themselves are not static, impulsive moves can render them useless. People also generally understand wicks. Candles with large wicks can represent a change in pattern, or volatile price movement. Combining those two to determine if price is reaching a pivot point is relatively novel. When Stochastic RSI (SRSI) filtering is also added, it becomes a genuinely unique combination that can be used to determine trade entries and exits.


What’s the benefit
The benefit of the indicator is that it can help potentially identify pivots WHEN THEY HAPPEN, and with potentially minimal retracement, depending on the trader’s time window. Many indicators wait for a trend to be established, or wait for a breakout to occur, or have to wait for some form of confirmation. In the interpretation used by this indicator, bands, wicks, and SRSI cycles provide both the signal and confirmation.

It takes into account 3 elements:

  1. Price approaching the upper or lower band or the baseline - MEANING: Price is becoming extended based on calculations that use the candle trading range.
  2. A candle wick of a defined proportion (e.g. wick is 1/2 the size of a full candle OR candle body) crosses a band or baseline, but the body does not cross the band or baseline - MEANING: Buyers and sellers are both very active.
  3. The Stochastic RSI reading is above 80 for SELL signals and below 20 for BUY signals - MEANING: Additional confirmation that price is becoming extended based on the current cyclic price pattern.



How to Use
SIGNALS
Buy Signals - Green(ish):
B Signal - Potential pivot up from the lower band when using the preferred multiplier
B1 Signal - Potential pivot up from baseline

Sell Signals - Red(ish):
S Signal - Potential pivot down from the upper band when using the preferred multiplier
S1 Signal - Potential pivot down from the baseline

DISCUSSION
During an uptrend or downtrend, signals from the baseline can help traders identify areas where they may enter the trending move with the least amount of drawdown. In both cases, entry points can occur with baseline signals in the direction of the trend.

For example, in an uptrend (when the price is forming higher highs and higher lows, or when the baseline is rising), price tends to oscillate between the upper band and baseline. In this case, the baseline BUY signal (B3) can show an entry point.

In a downtrend (when the price is forming lower highs and lower lows, or when the baseline is falling), price tends to oscillate between the baseline and the lower band. In this case, the baseline SELL signal (S3) can show an entry point.

During consolidation, when price is ranging, price tends to oscillate between the upper and lower bands, while crossing through the baseline unperturbed. Here, entry points can occur at the upper and lower bands.

When all conditions are met at the lower band during consolidation, a BUY signal (B), can occur. This signal may also occur prior to a break out of consolidation to the upside.

When all conditions are met at the upper band during consolidation, a SELL signal (S), can occur. This signal may also occur prior to a break out of consolidation to the downside.

Additional, B1 and S1 signals can be displayed that use the baseline as the pivot level.

Settings
SIGNALS
  • Show Bollinger Band Signals (Default: True): Allows signal labels to be shown.
  • Hide Baseline Signals (Default: False): Baseline signals are on by default. This will turn them off.
  • Show Wick Signals (Defau
lt: True): Displays signals when wicking occurs.

BOLLINGER BAND SETTINGS
  • Period length for Bollinger Band Basis (Default: 21): Length of the Bollinger Band (BB) moving average basis line.
  • Basis MA Type (Default: SMA): The moving average type for the BB Basis line.
  • Source (Default: “close”): The source of time series data.
  • Standard Deviation Multiplier (Default: 2.5: The deviation multiplier used to calculate the band distance from the basis line.


WICK SETTINGS FOR BOLLINGER BANDS
  • Wick Ratio for Bands (Default: 0.3): The ratio of wick size to total candle size for use at upper and lower bands.
  • Wick Ratio for Baseline (Default: 0.3): The ratio of wick size to total candle size for use at baseline.


WICK SETTINGS FOR CANDLE SIGNALS
  • Upper Wick Threshold (Default: 50): The percent of upper wick compared to the full candle size or candle body size.
  • Lower Wick Threshold (Default: 50): The percent of lower wick compared to the full candle size or candle body size.
  • Use Candle Body (Default: false): Toggles the use of the full candle size versus the candle body size when calculating the wick signal.


VISUAL PREFERENCES
  • Fill Bands (Default: true): Use a background color inside the Bollinger Bands.
  • Show Signals (Default: true): Toggle the Bollinger Band upper band, lower band, and baseline signals.
  • Show Bollinger Bands (Default: true): Show the Bollinger Bands.


STOCHASTIC SETTINGS
  • Use Stochastic RSI Filtering (Default: False): This will only trigger some SELL signals when the stochastic RSI is above 80, and BUY signals when below 20.
  • K (Default: 3): The smoothing level for the Stochastic RSI.
  • RSI Length (Default: 14): The period length for the RSI calculation.
  • Stochastic Length (Default: 8): The period length over which the stochastic calculation is performed.


Calculations
Bollinger Bands are a technical analysis tool that are used to measure market volatility and identify overbought or oversold conditions in the trading of financial instruments, such as stocks, bonds, commodities, and currencies. Bollinger Bands consist of three lines plotted on a price chart:

Middle Band, Basis, or Baseline: This is typically a simple moving average (SMA) of the closing prices over a certain period. It represents the intermediate-term trend of the asset's price.
Upper Band: This is calculated by adding a certain number of standard deviations to the middle band (SMA). The upper band adjusts itself with the increase in volatility.
Lower Band: This is calculated by subtracting the same number of standard deviations from the middle band (SMA). Like the upper band, the lower band adjusts to changes in volatility.

The candle wick signals occur if the wick is at the specified ratio compared to either the entire candle or the candle body. The upper band, lower band, and baseline signals happen if the wick is the specified ratio of the total candle size. For the major signals for upper and lower bands, these occur when the wick extends outside of the bands while closing a candle inside of the bands. For the baseline signals, they occur if a wick crosses a baseline but closes on the other side.


Other Usage Notes and Limitations
To understand future price movement, this indicator assumes that 3 things must be known:

  1. Evidence of a change of market structure. This can be demonstrated by increased volatility, consolidation, volume spikes (which can be tracked with the MW Volume Impulse Indicator) or, in the case of this indicator, candle wicks.
  2. The potential cause of the change. It could be a VWAP line (which can be tracked with the Multi VWAP [MW], and Multi VWAP from Gaps [MW] indicators), an event, an important support or resistance level, a key moving average, or many other things. This indicator assumes the ATR bands can be a cause.
  3. The current position in the price cycle. Oscillators like the RSI, and MACD, are typical measures of price oscillation (other oscillators like the Price and Volume Stochastic Divergence [MW] indicator can also be useful). This indicator uses the Stochastic RSI oscillator to determine overbought and oversold conditions.


When evidence of the change appears, and the potential cause of the change is identified, and the price oscillation is at a favorable position for the desired trading direction, this indicator will generate a signal.

ATR Bands (or Keltner Channels) are used to determine when price might “revert to the mean”. Crossing, or being near the upper or lower band, can indicate an overbought or oversold condition, which could lead to a price reversal. By tracking the behavior of candle wicks during these events, we can see how active the battle is between buyers and sellers.

If the top of a wick is large, it may indicate that sellers are aggressively attempting to bring the price down. Conversely, if the bottom wick is large, it can indicate that buyers are actively trying to counter the price action caused by selling pressure.

When this wicking action occurs at times when price is not near the upper band, lower band, or baseline, it could indicate the presence of an important level. That could mean a nearby VWAP line, a supply or demand zone, a round price number, or a number of other factors. In any case, this wick may be the first indication of a price reversal.

Shorter baseline periods may be better for short period trading like scalping or day trading, while longer period baselines can show signals that are better suited to swing trading, or longer term investing.

It's important for traders to be aware of the limitations of any indicator and to use them as part of a broader, well-rounded trading strategy that includes risk management, fundamental analysis, and other tools that can help with reducing false signals, determining trend direction, and providing additional confirmation for a trade decision. Diversifying strategies and not relying solely on one type of indicator or analysis can help mitigate some of these risks.

The TradingView platform allows a maximum of 500 labels per chart. This means that if your settings allow for a lot of signals, labels for earlier ones may not appear if the total number of labels exceeds 500 for the chart.
Bollinger Bands (BB)Candlestick AnalysissignalsStochastic RSI (STOCH RSI)wick

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?


Also on:

Disclaimer