TradingView
Daveatt
23 de Jul de 2019 14:19

Bollinger bands/Lagging span cross 

Bitcoin / U.S. dollarBitstamp

Descrição

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 :


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
Comentários
fredimm
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)
```
fredimm
ok this is not used but this is cloud values and other ichimoku lines, great.
Daveatt
@fredimm, indeed. This is the ichimoku cloud calculations
KenJason
Thank you Sir, for sharing this.

People want Accurate Real Time, Buy and Sell trade Signals.

Please keep up with Great work!
Daveatt
@KenJason, thank you :)
clocks156t174
Steve can just move the band forward.
Daveatt
@clocks156t174, Who's Steve :)?
clocks156t174
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[x_offset] )
sellEntry = crossunder(source, lower[x_offset] )
if (crossover(source, upper[x_offset] ))
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[x_offset] ))
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 )
onurkarabag
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?
Daveatt
@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
Mais