logo
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
garykong  
#1 Posted : Wednesday, January 25, 2006 2:32:12 PM(UTC)
garykong

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 4/30/2005(UTC)
Posts: 112

Hi all, Incidentially, I would like to know how to develop an indication to show the "volume distribution" (or volume by price).... see the attached image .... does any of the above have the same function?? GaryUserPostedImage
weird  
#2 Posted : Thursday, January 26, 2006 2:17:05 AM(UTC)
weird

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 8/3/2005(UTC)
Posts: 40

:oops: did not see the other thread where this was already answered, http://forum.equis.com/v...ic.php?t=3235&highlight= Roy's Volume By Price code is available there.
mstt  
#3 Posted : Thursday, January 26, 2006 3:57:26 AM(UTC)
mstt

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 7/25/2005(UTC)
Posts: 1,042

Was thanked: 57 time(s) in 54 post(s)
Hi Gary Try this. I've increased the number of plots to 25 and added a three-sided frame. All plots start at the right side of the chart (last bar). It's not practical to link the "zero" level of the volume bars to the left side of a chart display unless it's bar 1. Some earlier versions of "VBP" allowed plots to be moved to different points on a chart or scaled to a percentage of the longest volume bar. However the code to do that uses a lot of space and has been dicarded in favour of increasing the number of volume bars. More bells and whisles may be able to be added by linking this formula to a second one, but then it becomes a little clumsy to use. Feedback would be appreciated (particularly if it's a little more encouraging than "it doesn't work"). This is a work-in-progress so don't be too harsh - improvements can be made if they're realistic. BTW, it should work on any periodicity but has not been tested other than on EOD. Roy MetaStock Tips & Tools {Volume By Price 25} {©2006 Roy Larsen, www.metastocktips.com} d:=Input("Bars to Include",1,9999,100); n:=Input("Scaling Factor",1,99,5); k:=Input("Plot Frame?",0,1,1); y:=Cum(1);f:=LastValue(y);z:=f-1=y; d:=LastValue(If(d>=f,f-1,d));a:=(f-d<y)*(y>1); g:=a*V;b:=LastValue(Cum(g)); q:=LastValue(HighestSince(1,a=0,C)); r:=LastValue(LowestSince(1,a=0,C)); i:=(q-r)/25;u:=r+i*.5;m:=n*d/b; x:=LastValue(Cum((C<(r+i))*g));ValueWhen(1,f-x*m<y,u); x:=LastValue(Cum((C>=(r+i))*(C<(r+i*2))*g));ValueWhen(1,f-x*m<y,u+i); x:=LastValue(Cum((C>=(r+i*2))*(C<(r+i*3))*g));ValueWhen(1,f-x*m<y,u+i*2); x:=LastValue(Cum((C>=(r+i*3))*(C<(r+i*4))*g));ValueWhen(1,f-x*m<y,u+i*3); x:=LastValue(Cum((C>=(r+i*4))*(C<(r+i*5))*g));ValueWhen(1,f-x*m<y,u+i*4); x:=LastValue(Cum((C>=(r+i*5))*(C<(r+i*6))*g));ValueWhen(1,f-x*m<y,u+i*5); x:=LastValue(Cum((C>=(r+i*6))*(C<(r+i*7))*g));ValueWhen(1,f-x*m<y,u+i*6); x:=LastValue(Cum((C>=(r+i*7))*(C<(r+i*8))*g));ValueWhen(1,f-x*m<y,u+i*7); x:=LastValue(Cum((C>=(r+i*8))*(C<(r+i*9))*g));ValueWhen(1,f-x*m<y,u+i*8); x:=LastValue(Cum((C>=(r+i*9))*(C<(r+i*10))*g)); ValueWhen(1,f-x*m<y,u+i*9); x:=LastValue(Cum((C>=(r+i*10))*(C<(r+i*11))*g)); ValueWhen(1,f-x*m<y,u+i*10); x:=LastValue(Cum((C>=(r+i*11))*(C<(r+i*12))*g)); ValueWhen(1,f-x*m<y,u+i*11); x:=LastValue(Cum((C>=(r+i*12))*(C<(r+i*13))*g)); ValueWhen(1,f-x*m<y,u+i*12); x:=LastValue(Cum((C>=(r+i*13))*(C<(r+i*14))*g)); ValueWhen(1,f-x*m<y,u+i*13); x:=LastValue(Cum((C>=(r+i*14))*(C<(r+i*15))*g)); ValueWhen(1,f-x*m<y,u+i*14); x:=LastValue(Cum((C>=(r+i*15))*(C<(r+i*16))*g)); ValueWhen(1,f-x*m<y,u+i*15); x:=LastValue(Cum((C>=(r+i*16))*(C<(r+i*17))*g)); ValueWhen(1,f-x*m<y,u+i*16); x:=LastValue(Cum((C>=(r+i*17))*(C<(r+i*18))*g)); ValueWhen(1,f-x*m<y,u+i*17); x:=LastValue(Cum((C>=(r+i*18))*(C<(r+i*19))*g)); ValueWhen(1,f-x*m<y,u+i*18); x:=LastValue(Cum((C>=(r+i*19))*(C<(r+i*20))*g)); ValueWhen(1,f-x*m<y,u+i*19); x:=LastValue(Cum((C>=(r+i*20))*(C<(r+i*21))*g)); ValueWhen(1,f-x*m<y,u+i*20); x:=LastValue(Cum((C>=(r+i*21))*(C<(r+i*22))*g)); ValueWhen(1,f-x*m<y,u+i*21); x:=LastValue(Cum((C>=(r+i*22))*(C<(r+i*23))*g)); ValueWhen(1,f-x*m<y,u+i*22); x:=LastValue(Cum((C>=(r+i*23))*(C<(r+i*24))*g)); ValueWhen(1,f-x*m<y,u+i*23); x:=LastValue(Cum((C>=(r+i*24))*(C<(r+i*25))*g)); ValueWhen(1,f-Int(x*m)=y,u+i*24); x:=(f-d=y)*k;ValueWhen(1,x,q);ValueWhen(1,Alert(x,2),If(x,q,r));
mkz  
#4 Posted : Friday, January 27, 2006 12:34:10 PM(UTC)
mkz

Rank: Member

Groups: Registered, Registered Users
Joined: 8/8/2005(UTC)
Posts: 12

Thank you Roy, it works:) It would be good if there was an input for TickSize in order to plot the lines at the exact Tick levels (i.e @ES moves at 0.25 step), and also if we can specify the Number of Divisions (or maybe Min - Max Price Limits) As well begining and ending date (or/and time)
mstt  
#5 Posted : Friday, January 27, 2006 6:52:50 PM(UTC)
mstt

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 7/25/2005(UTC)
Posts: 1,042

Was thanked: 57 time(s) in 54 post(s)
mkz Everything you suggest is possible, but making a universal VBP indicator with MFL would be quite a mission. Some options tend to be mutually exclusive of others. As one example, accomodating a switch between date range, time range and bars takes a lot of code. I'll give some thought to your suggestions over the next few weeks. Roy MetaStock Tips & Tools
Users browsing this topic
Guest (Hidden)
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.