InvestitoreComune

Bollinger Bands Fibonacci ratios

The Fibonacci Bollinger Bands indicator is based on the same principles as the standard Bollinger Bands indicator developed by John Bollinger. The Fibonacci Bollinger Bands indicator bases its upper and lower bands on volatility just like the Bollinger Bands indicator does, but instead of using standard deviation as the measure of volatility, a Wilders Smoothed ATR is used in its place.

The middle band is a moving average used to establish the intermediate-term trend. The 3 upper bands are constructed by using the Wilders Smoothed ATR and multiplying it by each of the Fibonacci factors (1.618, 2.618, and 4.236) and then adding the results to the middle band. The 3 lower bands are constructed in the same manner as the upper bands except their results are subtracted from the middle band.
Skrip sumber terbuka

Dalam semangat TradingView yang sebenar, penulis skrip ini telah menerbitkannya dengan menggunakan sumber terbuka supaya pedagang-pedagang dapat memahami dan mengesahkannya. Sorakan kepada penulis! Anda dapat menggunakannya secara percuma tetapi penggunaan semula kod ini dalam penerbitan adalah dikawalselia oleh Peraturan Dalaman. Anda boleh menyukainya untuk menggunakannya pada carta.

Penafian

Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.

Ingin menggunakan skrip ini pada carta?
//@version=2
study("Bollingers Bands Fibonacci ratios",shorttitle="FiBB",overlay=true)
len=input(defval=20,minval=1)
p=close
sma=sma(p,len)
avg=atr(len)
fibratio1=input(defval=1.618,title="Fibonacci Ratio 1")
fibratio2=input(defval=2.618,title="Fibonacci Ratio 2")
fibratio3=input(defval=4.236,title="Fibonacci Ratio 3")
r1=avg*fibratio1
r2=avg*fibratio2
r3=avg*fibratio3
top3=sma+r3
top2=sma+r2
top1=sma+r1
bott1=sma-r1
bott2=sma-r2
bott3=sma-r3

t3=plot(top3,transp=0,title="Upper 3",color=teal)
t2=plot(top2,transp=20,title="Upper 2",color=teal)
t1=plot(top1,transp=40,title="Upper 1",color=teal)
b1=plot(bott1,transp=40,title="Lower 1",color=teal)
b2=plot(bott2,transp=20,title="Lower 2",color=teal)
b3=plot(bott3,transp=0,title="Lower 3",color=teal)
plot(sma,style=cross,title="SMA",color=teal)
fill(t3,b3,color=navy,transp=85)