blindfreddy

Breakdown Oscillator

This is an indicator I made, based on the observation that the longer the price action hugs the bottom bollinger band, the greater the danger of a breakdown occurring (price decline). Essentially its a moving average of the difference between close price and the bottom bollinger band, divided by the bottom bollinger band; I like to use 1.5 standard deviations for the 20 day bollinger band. When it crosses below zero there is increased danger of a breakdown, although of course it could turn right around and go up again. In fact if it does turn around sharply from near zero it can be a good time to buy in the context of a pullback within an uptrend. I also have included the 'slope factor' which makes the indicator more negative based on the rate of downward movement of the bollinger moving average (set to 0 to omit this modification). The indicator can be used just for exits or can be used for entry signals when crossing over the green bar if desired. In the example chart you can see the price hitting the lower band or crossing below the 50dMA plenty of times on the way up while the indicator says to hold tight. When the breakdown comes its after a prolonged period of low volatility (band squeeze) on the lower side of the moving average so the signal comes quickly - they won't all be this good of course. This indicator can also be used to help spot potential shorting candidates.
This indicator also works well on weekly charts; I like the 1 standard deviation with 16 to 24 week long period, 6 to 10 week short period and 30 buy level. Your mileage may vary, please do your own research.

Script de código aberto

Dentro do verdadeiro espírito TradingView, o autor deste script publicou ele como um script de código aberto, para que os traders possam compreender e checar ele. Um viva ao autor! Você pode usá-lo gratuitamente, mas a reutilização deste código em uma publicação é regida pelas Regras da Casa. Você pode favoritá-lo para usá-lo em um gráfico.

Aviso legal

As informações e publicações não devem ser e não constituem conselhos ou recomendações financeiras, de investimento, de negociação ou de qualquer outro tipo, fornecidas ou endossadas pela TradingView. Leia mais em Termos de uso.

Quer usar esse script no gráfico?
study("Breakdown Oscillator")  // by BlindFreddy
tdiffperiod=input(title="Short Period",type=integer,defval=10,minval=1)
tbbperiod=input(title="Boll. Band Period",type=integer,defval=20,minval=1)
ndevs=input(title="No. devs",type=float,defval=1.5,minval=0)
tbuy=input(title="Buy level",type=float,defval=20)
tsell=input(title="Sell level",type=float,defval=0)
slopefac=input(title="Slope factor",type=float,defval=2)
tSMA=sma(close,tbbperiod)
//bottom bollinger band:
tbottband = tSMA - ndevs * stdev(close, tbbperiod)
tdiff=close-tbottband +slopefac*(tSMA-tSMA[1])
tEMA=ema(tdiff,tdiffperiod)
tBreakdown = 100*tEMA/tbottband
h1=hline(tbuy,title='Buy Level',color=green,linestyle=dashed)
h2=hline(tsell,title='Sell Level',color=red,linestyle=dashed)
plot(tBreakdown)