Volume chart (Volume bars)
Author: bishop
Creation Date: 2/2/2012 2:06 AM
profile picture

bishop

#1
Hello, is it possible to plot Volume chart in WL?
profile picture

Eugene

#2
What on earth is a "Volume chart" and how's it different from VolumePane?

Is it something like this mountain chart? UnusualVolumeOnPricePane

Maybe it's something like this: Price Volume Distribution?

Or is it close to this study: Price/Volume Heat Map?
profile picture

bishop

#3
On the Earth there is only one Volume Chart and it is what others trading platform, like Ninja, RightEdge, MC and others provide by default: it is a candle chart based on a specific number of volume traded. A bar will build until the specified by user volume is reached, after that a new bar will be created, for example, i'd like to plot a chart based on 10000 volume value, which means that each candle on the chart will have 10000 volume, no more, no less.

Is it possible?

profile picture

Eugene

#4
The problem is, the term used aka "Volume Chart" is pretty much vague and confusing.

What you're asking for goes as Constant Volume Bars in my book. And it's something we have here:

Community ChartStyles
profile picture

bishop

#5
Eugene, I think we are getting closer, thanks.

I have installed this extension and tried CVB bars. But I couldn't understand how it works. I have applied this chart type on AA daily, changed volume threshold to 10000, but nothing happened.

Can you, please popularize how to use it and what I did wrong?
profile picture

Eugene

#6
Vitaly,

What did you expect by setting the threshold to 10,000 for a Dow 30 security that trades 30 million shares a day on average? 30,000,000 / 10,000 = 3000 bars crowding the chart instead of just a single Daily bar? ;)

For AA, try to set the value at least 500-1000 times greater. A new bar is created exactly as per your description above, so the value you pick should be reasonable and should exceed some typical volume for this to work. This technique is based on combining (aggregating, grouping) several bars' worth of volume into one, larger volume bar.
profile picture

bishop

#7
You are right, my mistake :)
I tried to set 35mln and others values and now the chart changed its look.

I usually use 10000 volume for ticks bars, so each bar is a 10000 volume bar. I didn't take into account that i'm applying CVB to a daily chart.

One more thing, how do i know that each current bar is a really 35mln. volume bar? Is there a way to check or I should blindly trust? (actually I trust you, but checking is my habit :) )
profile picture

Eugene

#8
Don't take my word for it. Login to the Wiki, grab the Community ChartStyles (it's open source), and look into the ConstantVolumeChartStyle.cs class. The grouping logic is contained in the RenderBars method.
profile picture

bishop

#9
thank you very much.
profile picture

Eugene

#10
Let's change the topic name a bit to facilitate finding it.
profile picture

bishop

#11
Eugene, I have applied SMA to CVB chart and I see that SMA is still calculated not on CVB bars. Is it possible to calculate SMA based on CVB?
profile picture

Eugene

#12
No, this is a ChartStyle while indicators are applied to the Bars object.
profile picture

bishop

#13
got you, thanks a lot.
profile picture

Eugene

#14
To apply indicators such as SMA, you might want to borrow the code that builds CVB from the ChartStyle. Build the CVB synthetic bars in your Strategy (there are many examples e.g. QuickRef > Bars.SaveToFile and lots more) and apply SMA to that Bars/DataSeries.
profile picture

bishop

#15
Ok, thanks for the idea.
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).