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.
Скрипт с открытым кодом

В истинном духе TradingView автор этого скрипта опубликовал его с открытым исходным кодом, чтобы трейдеры могли понять, как он работает, и проверить на практике. Вы можете воспользоваться им бесплатно, но повторное использование этого кода в публикации регулируется Правилами поведения. Вы можете добавить этот скрипт в избранное и использовать его на графике.

Отказ от ответственности

Все виды контента, которые вы можете увидеть на TradingView, не являются финансовыми, инвестиционными, торговыми или любыми другими рекомендациями. Мы не предоставляем советы по покупке и продаже активов. Подробнее — в Условиях использования TradingView.

Хотите использовать этот скрипт на графике?
//@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)