IldarAkhmetgaleev

Vol color bars

Highlight bars according it's volume releative to near candles. This script usefull for VSA trading.
Red bar - extrime high volume
Orange bar - volume is high
Grayish bar - volume is normal
Green bar - volume is low
Blue bar - almost no volume
نص برمجي مفتوح المصدر

قام مؤلف هذا النص البرمجي بنشره وجعله مفتوح المصدر، بحيث يمكن للمتداولين فهمه والتحقق منه، وهو الأمر الذي يدخل ضمن قيم TradingView. تحياتنا للمؤلف! يمكنك استخدامه مجانًا، ولكن إعادة استخدام هذا الكود في منشور تحكمه قواعد الموقع. يمكنك جعله مفضلاً لاستخدامه على الرسم البياني.

إخلاء المسؤولية

لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.

هل تريد استخدام هذا النص البرمجي على الرسم البياني؟
study(title="Vol color bars", shorttitle="VolBar", overlay=true)
std_len = input(40, minval=5, title='Deviation lenght')
thresshold1 = input(200, minval=0, title='Thresshold 1') / 100
thresshold2 = input(300, minval=0, title='Thresshold 2') / 100
thresshold3 = input(50, minval=0, title='Thresshold Low 1') / 100
thresshold4 = input(25, minval=0, title='Thresshold Low 2') / 100

color1 = #FF0000
color2 = #FF9100
color3 = #888818
color4 = #00DD23
color5 = #0099FF

avg = stdev(volume, std_len)
highvol1 = volume > avg * thresshold1
highvol2 = volume > avg * thresshold2
lowvol1 = volume < avg * thresshold3
lowvol2 = volume < avg * thresshold4

color = highvol2 ? color1 : highvol1 ? color2 : lowvol2 ? color5 : lowvol1 ? color4 : color3 

barcolor(color)

// upbar = close[1] - close
// plotarrow(upbar, transp=60, colorup=red, colordown=green)