[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Chip's Tips - Colored Volume Bars



PureBytes Links

Trading Reference Links

Creating Charts with Colored Volume Bars
========================================
MetaStock already had built-in support for displaying different
colored price plots depending on whether the stock had up or down day
(right-click the price plot, choose "Properties", adjust the "Colors"
settings).  But what about coloring the volume bars based on daily
up/down performance?  

Many people like to color both price and volume bars in order to help
spot trends and divergences.  Unfortunately, right-clicking on a
standard volume plot and chosing "Properties" reveals that MetaStock
has no built-in support for this.  Fortunately, with a couple of
simple custom indicators you can simulate this kind of plot fairly
easily.

First, we need to create two new custom indicators - one called "Up
Volume" the other called "Down Volume".  Here are the steps:

1.) Use the "Tools/Indicator Builder" command, then press the "New"
button.

2.) Enter "Up Volume" in the Name field.

3.) Carefully enter "If(C>Ref(C,-1),V,0)" in the Formula field.

If today's close ("C") is more than yesterday's close ("Ref(C,-1)")
then it's an Up day and we set the value of the indicator equal to
today's volume ("V"), otherwise we set the indicator to zero.

4.) Press OK to create the indicator, then press the "New" button again.

5.) Enter "Down Volume" in the Name field.

6.) Carefully enter "If(C<=Ref(C,-1),V,0)" in the Formula field and
press OK.

7.) We're done, so you can press "Close" to return to your chart.

(Note: You only need to do the above steps once.)

Now, we'll plot these two new indicators as different colored
overlapping histograms at the bottom of our chart.  Here's how:

1.) Create a new chart for any security you have available.  Make sure
you have Volume data for the security you chose.

2.) (Optional) Right click on the price plot and choose "Properites." 
Choose "Bars (Open, High, Low, Close)" and pick Black for the Up color
and Red for the Down color then click OK.  You might want to remove
any other indicators or line studies also.

3.) Drag the "Up Volume" indicator from the Quick List down to the
bottom of the chart and drop it on the X-Axis so it creates a new
inner window.

4.) Right click on the new indicator line and choose "Properties." 
Now change the Color to Black (or whatever you prefer for Up days) and
select the histogram style.

5.) Now drag the "Down Volume" indicator from the Quick List and drop
it into the same inner window that the Up Volume is in.  Choose "Merge
with scale on Right" if asked. 

6.) Carefully right click on the new line and choose "Properties." 
Change the Color to Red (or whatever) and select the histogram style.

7.) If the vertical scale seems messed up, try right clicking on it
and set the Minimum value to zero.

If you like this kind of chart, you should save it as a Template using
the "File/Save As..." command.
===========================

Thanks to Richard Estes for suggesting this tip on a Silicon Investor
thread.

Let me know if you have any comments or questions.
Chip
_________________________________________________________
DO YOU YAHOO!?
Get your free @yahoo.com address at http://mail.yahoo.com