trading.kay27

Kay_BBands

All right people... !!
Here is one more crazy stupid experiment by me while boosing. I call it..... Well Bollinger Bands for now..
If you like it and find it useful, give me suggestions, we can name it.

Its was just an idea of removing unnecessary opposite bands (noise i say) and it turned out to be useful to me.
After finishing, I saw good locations of support and resistance levels building.
Just connect the flat lines it create.

See if that interests you...!! Please leave comments below even if you are not in mood.
Thanks..

Mã nguồn mở

Với tinh thần TradingView, tác giả của tập lệnh này đã xuất bản nó dưới dạng mã nguồn mở, vì vậy các nhà giao dịch có thể hiểu và xác minh nó. Chúc mừng tác giả! Bạn có thể sử dụng mã này miễn phí, nhưng việc sử dụng lại mã này trong một ấn phẩm chịu sự điều chỉnh của Nội quy nội bộ. Bạn có thể yêu thích nó để sử dụng nó trên biểu đồ.

Thông báo miễn trừ trách nhiệm

Thông tin và ấn phẩm không có nghĩa là và không cấu thành, tài chính, đầu tư, kinh doanh, hoặc các loại lời khuyên hoặc khuyến nghị khác được cung cấp hoặc xác nhận bởi TradingView. Đọc thêm trong Điều khoản sử dụng.

Bạn muốn sử dụng tập lệnh này trên biểu đồ?
study(shorttitle="Kay_BB", title="Kay_BBands", overlay=true)
length = input(20, minval=1)
src = input(close, title="Source")
mult = input(2.0, minval=0.001, maxval=50)
basis = sma(src, length)
dev = mult * stdev(src, length)
isU = close > basis// and close > basis
//isBetween = (open > basis and close < basis) or (open < basis and close > basis)
isD = close < basis//open < basis and close < basis

upperB = basis + dev
lowerB = basis - dev

upper = isU and highest(close, length) == close ? upperB : upperB < fixnan(upper[1]) ? upperB : fixnan(upper[1])
lower = isD and lowest(close, length) == close ? lowerB : lowerB > fixnan(lower[1]) ? lowerB : fixnan(lower[1])

plot(basis, color=red, title="BB Basis")
p1 = plot(upper, color=black, title="BB Upper modified")
p2 = plot(lower, color=black, title="BB Lower modified")
fill(p1, p2, color=purple, transp=90, title="Modified")

p3 = plot(upperB, color=red, title="BB Upper")
p4 = plot(lowerB, color=red, title="BB Lower")
fill(p3, p4, color=red, transp=95, title="Background")