FiratAkol

BB + Volume Based Coloured Bars

//@version=3
//author KIVANC @fr3762 on twitter
//indicates the price bars whether it's supported by volume or not

study("BB + Volume Based Coloured Bars", shorttitle="VCBB", overlay=true)
length=input(21, "length", minval=1)
avrg=sma(volume,length)

vold1 = volume > avrg*1.5 and close<open
vold2 = volume >= avrg*0.5 and volume<=avrg*1.5 and close<open
vold3 = volume < avrg *0.5 and close<open

volu1 = volume > avrg*1.5 and close>open
volu2 = volume >= avrg*0.5 and volume<=avrg*1.5 and close>open
volu3 = volume< avrg*0.5 and close>open


cold1=#800000
cold2=#FF0000
cold3=orange


colu1=#006400
colu2=lime
colu3=#7FFFD4


color = vold1 ? cold1 : vold2 ? cold2 : vold3 ? cold3 : volu1 ? colu1 : volu2 ? colu2 : volu3 ? colu3 : na

barcolor(color)

per = input(20, title="BB Periodu")
sapma = input(2,title="BB Sapma Çarpaný")
source = close
ortaband = sma(source, per)
stsapma = sapma * stdev(source, per)
ustBB = ortaband + stsapma
altBB = ortaband - stsapma
plot(ortaband, color=blue, linewidth=2, title="BBup")
plot(ustBB, color=red, linewidth=2, title="BBmid")
plot(altBB, color=red, linewidth=2, title="BBdown")
สคริปต์โอเพนซอร์ซ

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

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

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

ต้องการที่จะใช้สคริปต์นี้บนชาร์ตใช่ไหม?