Discussions
»
Product and Service Development
»
MetaStock
»
different colours of volume bars [RESOLVED]
Rank: Newbie
Groups: Registered, Registered Users, Subscribers Joined: 5/10/2006(UTC) Posts: 1
|
Hi,
Can someone please tell me that is it possible to have different colours of volume bars for up and down days and how in metastock profession 9.0?
Regards
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 3/7/2005(UTC) Posts: 1,346
|
hey stocklord....... there are several ways to do that.... the indicators below are couple examples..... when you plot them it will plot 2 odd lookin lines.... lookin close you can see which line is for down days...... click on it change the properties to histogram style and red....... click on the second line and change to green and histogram......
the 2nd indicator plots the up/down seperated by the 0 line......h
simply color {change each line to histogram and color to suit}
If(V> Ref(V,-1 ),V,0);
If(V< Ref(V,-1 ),V,0);
up/dn by 0 line
If(C>Ref(C,-1),V,0);
If(C<Ref(C,-1),V*-1,0)
up/down by color moving averages
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers, Unverified Users Joined: 10/28/2004(UTC) Posts: 3,111 Location: Perth, Western Australia
Was thanked: 16 time(s) in 16 post(s)
|
h,
Ever notice that when C=Ref(C,-1) the colour of the volume bar can be different to that of the price bar?
To synchronise the two, so the colours always the same you need a little more code:
direction:=C-Ref(C,-1);
direction:=ValueWhen(1,direction<>0,direction);
(direction>0)*V;
(direction<0)*V;
wabbit :D
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 3/7/2005(UTC) Posts: 1,346
|
hey wabbit.... thanks for pointing that out.... originaly i had included the 'or' for c=ref(c,-1) , later took it out..... decided that day might be best viewed as a wash, no plot.... but now looking at your code and the situation much deeper, i'm truly confused as to just what process meta is using to determine an up day when applying color....
it almost appears if(c=ref(c,-1) then color=ref(color,-1) .... will look deeper tommorrow..... thanks again.....h
your code is much better,
mine here always ploted c=ref(c,-1) as green....
If((C>Ref(C,-1) OR C=Ref(C,-1)),V,0);
If(C<Ref(C,-1),V*-1,0);
---------------
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers, Unverified Users Joined: 10/28/2004(UTC) Posts: 3,111 Location: Perth, Western Australia
Was thanked: 16 time(s) in 16 post(s)
|
h_
I am reasonably sure that MS uses a similar logic to what I have done (or me to MS)
If an up day then colour the bar green,
If a down day colour the bar red,
If neither up nor down, then colour the bar whatever colour was the last, up or down
wabbit :D
|
|
|
|
Rank: Newbie
Groups: Registered, Registered Users, Subscribers Joined: 5/31/2006(UTC) Posts: 7
|
This is exactly what I am looking for, but I'm new to Metastock and would really appreciate further details on how to install this indicator.
I did try but all I got was two red lines laid over the top of the original blue bars.
any help would be most appreciated.
Thanks in advance.... =D>
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 3/7/2005(UTC) Posts: 1,346
|
hey d..... sounds like your overlaying the 2 volumes.... try putting it into its own window.... you should be able to tell which line is for up volume..... click on that red line and change the color to green and set style to histogram..... click the other squiggly red line and set its style to histogram..... that should do it.... the picture below has the before and after along with other volumes......h
hmmmmm, just noticed the image situation has changed..... h
|
|
|
|
Rank: Newbie
Groups: Registered, Registered Users, Subscribers Joined: 5/31/2006(UTC) Posts: 7
|
Heyseed !
Thats just what I needed.. Thank You. =D>
|
|
|
|
Users browsing this topic |
Guest (Hidden)
|
Discussions
»
Product and Service Development
»
MetaStock
»
different colours of volume bars [RESOLVED]
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.