This script points out the positions a lagging span leaves a .
This script does not plot a lagging span but moves the forward.
You can find profit opportunities by combining this script and risk management.
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 .
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 forward so that the price can be compared to the values of the 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 forward according to the offset parameter.
(6) Mark the points the price leaves the shifted
(7) Compute the most possible loss and profit before the next opposite signal.
source : the data for computing the . can be open, high, low, close or their combination.
length : how many days are calculated by the
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
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.
@Daveatt , /Lagging span cross , BGyrPgOA , Tradingview 2019
How to trade with
How to use
How to trade with a line chart
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 a publication is governed by House Rules. You can favorite it to use it on a chart.