Daveatt

Bollinger bands/Lagging span cross

Hello my dear ambitious traders

I'm working hard this week to publish some great indicators this week and open sourced. Hope you'll enjoy, learn and use them.
This will be my greatest reward but comments showing appreciation are also very welcomed (actually likes too) :)

For today, I'll share a simple indicator but it's coming along with some insightful knowledge ^^
Anyway, I'm not here to ask you to this but to share a very cool indicator I made a few months ago and wanted to share for FREE with the community today
The indicator is related to this educational post : What-a-Bollinger-Bands-Lagging-span-cross-can-tell-us/

This trading technique was invented by Robbytrade, a famous french trader https://twitter.com/Robbytrade

I wanted to have those visual signals on the chart so I coded it.
The advantage of being a developer is that you can litteraly code what you miss and get your life better in the process. The one that will find a way to code a new form of money will be rich... wait.... that guy is called Satoshi Nakamoto...

That's all for me today my friends

PS
Trying to update the Trade Manager shared yesterday with some cool features. More to come in the upcoming days

Enjoy
Dave
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 a publication is governed by House Rules. You can favorite it to use it on a chart.

Want to use this script on a chart?
💰 Results/Blogs: https://bit.ly/2ULUtjo

⏩ Signals/Pricing: https://best-trading-indicator.com/pages/pricing

🐦 Twitter: https://twitter.com/bti_trading

👉 Get a $30 discount on TradingView: https://bit.ly/2UM5OA0

📺 Youtube: https://bit.ly/3bKvnZu

Kommentarer

Thanks man it looks great!

What are those lines for?

```
donchian(len) => avg(lowest(len), highest(len))

conversionLine = donchian(conversionPeriods)
baseLine = donchian(basePeriods)
leadLine1 = avg(conversionLine, baseLine)
leadLine2 = donchian(laggingSpan2Periods)
```
+3 Svara
fredimm fredimm
ok this is not used but this is cloud values and other ichimoku lines, great.
Svara
Daveatt fredimm
@fredimm, indeed. This is the ichimoku cloud calculations
Svara
Steve can just move the band forward.
+1 Svara
Daveatt clocks156t174
@clocks156t174, Who's Steve :)?
Svara
Steve is not a fixed person.
However, you can try the following code.

//@version=4
strategy("LAGging span leaves Bollinger Bands strategy" , shorttitle="LagBB" , overlay=true)
source = input( hl2 )
length = input(20, minval=1)
mult = input(2.0, minval=0.001, maxval=50)
x_offset = input( 26 ,minval=0 , maxval=244 )

basis = sma(source, length)
dev = mult * stdev(source, length)
upper = basis + dev
lower = basis - dev
buyEntry = crossover(source, upper )
sellEntry = crossunder(source, lower )
if (crossover(source, upper ))
strategy.entry("LE", strategy.long, stop=lower, oca_name="BollingerBands", oca_type=strategy.oca.cancel, comment="LE")
else
strategy.cancel(id="LE")
if (crossunder(source, lower ))
strategy.entry("SE", strategy.short, stop=upper, oca_name="BollingerBands", oca_type=strategy.oca.cancel, comment="SE")
else
strategy.cancel(id="SE")
//plot(strategy.equity, title="equity", color=color.red, linewidth=2, style=plot.style_areabr)
plot( upper , color=#cccc00 , transp=50 , offset=x_offset )
plot( basis , color=#cccc00 , offset=x_offset )
plot( lower , color=#cccc00 , transp=50 , offset=x_offset )
Svara
First of all thanks for sharing. these signals come with a delay. What can we do to make it come with candle closures. Again Lagging should create it according to spa but we can't try to show it in real time?
+1 Svara
Daveatt onurkarabag
@onurkarabag, the concept of "lagging" in "lagging span" means the signal will be delayed (= lagging) based on 26 candles before
However, the signals and alerts are produced in real-time but based on a cross happening 26 candles before
Svara
@Daveatt, understand. thank you
Svara
Very cool. thanks for that
Svara