LazyBear

Colored Volume Bars [LazyBear]

Edgar Kraut proposed this simple colored volume bars strategy for swing trading.

This is how the colors are determined:
- If today’s closing price and volume are greater than 'n' days ago, color today’s volume bar green.
- If today’s closing price is greater than 'n' days ago but volume is not, color today’s volume bar blue.
- Similarly, if today’s closing price and volume is less than 'n' days ago, color today’s volume bar orange.
- If today’s closing price is less than 'n' days ago but volume is not, color today’s volume bar red.

Buy the green or blue volume bars, use a 1% trailing stop, and stand aside on red or orange bars.

As you see, this is more for entry confirmation. I have not tested this on any instrument.

You may have to tune the lookback period for your instrument. Default is 10.

More info:
"A color-based system for short-term trading" - http://www.traders.com/Documentation/FEEDbk_Docs/2011/07/kraut.html

List of all my indicators:
Master Index: List of all my indicators

Remove from Favorite Scripts Add to Favorite Scripts
//
// @author LazyBear 
// List of all my indicators: https://www.tradingview.com/v/4IneGo8h/
//
study("Colored Volume Bars [LazyBear]", shorttitle="CVOLB_LB")
lookback=input(10)
showMA=input(false)
lengthMA=input(20)
p2=close
v2=volume
p1=p2[lookback] 
v1=v2[lookback] 
c=	iff(p2>p1 and v2>v1, green, 
	iff(p2>p1 and v2<v1, blue,
	iff(p2<p1 and v2<v1, orange,
	iff(p2<p1 and v2>v1, red, gray))))
plot(v2, style=columns, color=c)
plot(showMA?sma(v2, lengthMA):na, color=maroon)
List of my free indicators: http://bit.ly/1LQaPK8
List of my indicators at Appstore: http://blog.tradingview.com/?p=970

Avatarhash
2 years ago
Interesting, thanks
Reply
LazyBear PRO Avatarhash
2 years ago
yw.
+1 Reply
ChartArt
2 years ago
This is very useful. Thanks!

I usually hide the volume, but these colors - which are different with each scenario - add real value to the volume indicator.
Reply
MarvinMartian ChartArt
2 years ago
Why in the world would you hide volume? I presume you mean, typically hide volume on anything EXCEPT BTC, because you can't trade an cryptocoin without knowing volume.

I do appreciate the colored volume code tho. I use volume =)
Reply
LazyBear PRO ChartArt
2 years ago
Thanks.

Do check out my other enhanced volume indicators (they are listed in the master list)
- Weis wave volume
- Better Volume Indicator
- Hawkeye volume
+1 Reply
MarvinMartian
2 years ago
Yeah, this is actually extra awesome because I've been meaning to find a way to detach volume from the main chart. Saved me some time.
Reply
LazyBear PRO MarvinMartian
2 years ago
Thanks.

Just FYR: you can right click on any indicator name and select "Unmerge down/up" to get it on its own separate pane.
+1 Reply
MarvinMartian LazyBear
2 years ago
Oh that's supercool and useful =) thanks.

I think I'm going to make some frankenstein charts now!
Reply
How about Colored Candles with Colored Bars?
Reply
LazyBear PRO QuantitativeExhaustion
2 years ago
Add the following 2 lines to the end of the script.

ebc=input(true, title="Enable bar colors")
barcolor(ebc?c:na)
+2 Reply
Great! So simple and easy to visualize! I love it!
Reply
Ideas Scripts Chart
United States
United Kingdom
India
España
Italia
Brasil
Россия
Türkiye
日本
한국
Home Stock Screener Economic Calendar How It Works Chart Features House Rules Moderators For the WEB Widgets Stock Charting Library Priority Support Feature Request Blog & News FAQ Help & Wiki Twitter
Private Messages Chat Ideas Published Followers Following Priority Support Public Profile Profile Settings Billing Sign Out