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..

สคริปต์โอเพนซอร์ซ

ด้วยจิตวิญญาณของ TradingView อย่างแท้จริง ผู้เขียนสคริปต์นี้ได้เผยแพร่เป็นโอเพนซอร์ส เพื่อให้ผู้ค้าสามารถเข้าใจและตรวจสอบได้ ไชโยให้กับผู้เขียน! คุณสามารถใช้ได้ฟรี แต่การใช้รหัสนี้ซ้ำในสิ่งพิมพ์อยู่ภายใต้กฎระเบียบการใช้งาน คุณสามารถตั้งเป็นรายการโปรดเพื่อใช้บนชาร์ตได้

คำจำกัดสิทธิ์ความรับผิดชอบ

ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมที่ เงื่อนไขการใช้บริการ

ต้องการที่จะใช้สคริปต์นี้บนชาร์ตใช่ไหม?
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")