clocks156t174

LAGging span leaves Bollinger Bands strategy

Abstract
This script points out the positions a lagging span leaves a Bollinger Band.
This script does not plot a lagging span but moves the Bollinger Band forward.
You can find profit opportunities by combining this script and risk management.

Introduction
Bollinger Bands is a popular indicator.
It contains a moving average, an upper band and a lower band.
The moving average can indicate trend, the upper band and the lower band can indicate if the price is far away from the moving average.
However, in trading markets, anything can happen.
Both continuation and reversal are possible when the price touches the moving average, the upper band or the lower band.
Therefore, many traders adjust the parameters of the Bollinder Band or add other indicators to improve their trading strategies.
@Daveatt et. al. provided an idea that uses a lagging span.
A lagging span is a line chart. It displays the reference price but in earlier time.
For example, if the offset of a lagging span is 26 days, the value of the lagging span on 29 days ago is the reference price 3 days ago.
A lagging span is a part of Ichimoku Cloud.
It can compare the price to the earlier price and the values of indicators in the past.
To compare the price to the values of indicators in the past, we can also shift indicators forward instead of adding a lagging span into the chart.
This script uses shift-the-indicators-forward method.
In other words, this script plots the Bollinger Band forward so that the price can be compared to the values of the Bollinger Band in the past.

Computing and Adjusting
(1) Compute Moving Average
(2) Compute Standard Derivation
(3) Upper Band = Moving Average + Standard Derivation * Multi
(4) Lower Band = Moving Average - Standard Derivation * Multi
(5) Shift the Bollinger Band forward according to the offset parameter.
(6) Mark the points the price leaves the shifted Bollinger Band
(7) Compute the most possible loss and profit before the next opposite signal.

Parameters
source : the data for computing the bollinger band. can be open, high, low, close or their combination.
length : how many days are calculated by the bollinger band
mult : the distance from the moving average to the upper band and the distance from the moving average to the upper band is equal to ( mult * standard derivation ) .
x_offset : the offset of the lagging span

Conclusion
This script can find signals for potential breakout or trend continuation.
If you want to use this signal well, you need to know when to cut loss and protect the profit.

Reference
@Daveatt , Bollinger bands/Lagging span cross , BGyrPgOA , Tradingview 2019
How to trade with Bollinger Bands
How to use Ichimoku Cloud
How to trade with a line chart
オープンソーススクリプト

TradingViewの精神に則り、このスクリプトの作者は、トレーダーが理解し検証できるようにオープンソースで公開しています。作者に敬意を表します!無料で使用することができますが、このコードを投稿で再利用するには、ハウスルールに準拠する必要があります。 お気に入りに登録してチャート上でご利用頂けます。

免責事項

これらの情報および投稿は、TradingViewが提供または保証する金融、投資、取引、またはその他の種類のアドバイスや推奨を意図したものではなく、またそのようなものでもありません。詳しくは利用規約をご覧ください。

チャートでこのスクリプトを利用したいですか?