Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 5/4/2005(UTC) Posts: 63 Location: Poole Dorset England
|
Hello Everyone. With regards top my post for a "Triple Colour Coded Volume indicator."
I'm very sorry but I seem to have been very bland in my post, not being specific in exactly what I would like to be able to achieve and also where my knowledge of formulas is practically above zero I have been a little confused myself. If I'm confused, then how is anyone able to help if I don't know exactly what I'm looking to do ! :-)
So here goes, I think I can clarify the situation.
Firstly, I've dug deep into the forum and some other websites. I found here ;
http://forum.equis.com/forums/thread/23864.aspx Different colours for volume bars
An excellent post/threads regarding volume. I really like Henry1224 formula
Up:=If(C>Ref(C,-1),V,0); dn:=If(C<Ref(C,-1),v,0); Neutral:=If(C=Ref(C,-1),v,0); up;Dn;Neutral;
As this plotted all 3 colours within an inner window in 1 go
I also liked Wabbit's suggestion here; http://forum.equis.com/viewtopic.php?t=3913 to synchronise coloured volume to price volume colour.
Regarding above threads, these are all great but I notice they are always looking to colour the volume (I think) relating to the previous days close
What I am looking to construct is a triple coloured volume indicator that mirrors the price regarding the same day open and close relationship.
I'll explain further.
Here is what I would like to achieve;
1. If today's close is higher than today's open then volume colour would be green. 2. If today's close is lower than its open the volume colour would be red. 3. If today's close is the same as it's opening price the volume colour would be blue.
So the volume colour only relates to it's open and closing price , not to the previous days close.
I'm just not sure how to write this. Looking at henry's formula;
Up:=If(C>Ref(C,-1),V,0); dn:=If(C<Ref(C,-1),v,0); Neutral:=If(C=Ref(C,-1),v,0); up;Dn;Neutral;
I thought it might be something like this;
Up:=If(C>open,V,green); dn:=If(C<open,v,red); Neutral:=If(C=open),v,blue); up;Dn;Neutral;
As you can see,,, Not a clue. I'm determined to try a bit harder and crack this,,, (4am,, now 7.50am:-( After looking in metastock help (Index,, Reference Function helped me a lot),, trial and error and trying to think a bit logically, I've come up with this,, Seems to work, I think,, I had to change things around abit,, Plotted as histogram
Up:=If(OPEN<Ref(CLOSE,-0),V,0); dn:=If(OPEN>Ref(CLOSE,-0),V,0); Neutral:=If(OPEN=Ref(CLOSE,-0),V,0); up;Dn;Neutral;
So now it will pick up neutral volume (Harami),,, and colour is coded to price Open / Close relationships.
Please, if there are any good coders reading this,, if you could just confirm if I have written this correctly. Tried my best. I think it's ok, but not sure.
I hope this might be of some use to people out there if it is ok. I couldn't have written it without analysing some of the other posts on this forum. Thank you all.[:)]
|