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

Re: [EquisMetaStock Group] VAP (volume at price) indicator



PureBytes Links

Trading Reference Links

--- Dusant <cooldush@xxxxxxxxxxx> wrote:
> lecorbeauxmasque,
> Now that you seem to have the hang of it, why don't
> you post your 
> final indicators, please?
> Also a few lines about how to use the indicator, or
> a link where we 
> can find the method of interpretation in detail.
> Thank you.
> Dusant
> 


dusant i was on the point of doing, actually i posted
it 10min b4 your mail came on a forum (just next to
roy's original) and was tiping this mail as your mail
came...
1/ the code :

i added some option to roy's code :
as per his instructions this version has been expanded
to almost 100 (97) 
volume bars
i also expanded the price zone for whish the volume
can be accounted from the bar's closing price (roy's
version up above)
to any price within a bar, and virtually all of them
togheter (thus rising the accuraccy of the tool above
qchart's version)
roy's code is also very easy to play with in that it
is built in a way you can praticly change all the
components to your taste and it will still work
fine....
-all mistakes are mine-

[use this version instead of the one from the forum,
some typo have been corrected here]



{ROY LARSEN:VAP for MS} 

{ vap-A}
q2:=input(“precision”,1,9,5);
q3:=input(“select segment”,1,9,5);
q1:=(l+((h-l)/q2)*q3);
D:=Input("Set Default Periods",0,2000,200);
N:=5; {scaling factor}
D:=LastValue(If(D=0,LastValue(Cum(1)-1),D));
F:=LastValue(Cum(1));
A:=F-D<Cum(1);
B:=LastValue(Cum(If(A,V,0)));
Q:=LastValue(HighestSince(1,A=0,C));
R:=LastValue(LowestSince(1,A=0,C));
I:=(Q-R)/96;  K:=.5;
X:=LastValue(Cum(If(q1<(R+I) AND A,V,0))/B);
ValueWhen(1,F-X*D*N<Cum(1),R+I*K);
X:=LastValue(Cum(If(q1>=(R+I) AND q1<(R+I*2) AND
A,V,0))/B);
ValueWhen(1,F-X*D*N<Cum(1),R+I*3*K);
X:=LastValue(Cum(If(q1>=(R+I*2) AND q1<(R+I*3) AND
A,V,0))/B);
ValueWhen(1,F-X*D*N<Cum(1),R+I*5*K);
X:=LastValue(Cum(If(q1>=(R+I*3) AND q1<(R+I*4) AND
A,V,0))/B);
ValueWhen(1,F-X*D*N<Cum(1),R+I*7*K);
X:=LastValue(Cum(If(q1>=(R+I*4) AND q1<(R+I*5) AND
A,V,0))/B);
ValueWhen(1,F-X*D*N<Cum(1),R+I*9*K);
X:=LastValue(Cum(If(q1>=(R+I*5) AND q1<(R+I*6) AND
A,V,0))/B);
ValueWhen(1,F-X*D*N<Cum(1),R+I*5.5);
X:=LastValue(Cum(If(q1>=(R+I*6) AND q1<(R+I*7) AND
A,V,0))/B);
ValueWhen(1,F-X*D*N<Cum(1),R+I*6.5);
X:=LastValue(Cum(If(q1>=(R+I*7) AND q1<(R+I*8) AND
A,V,0))/B);
ValueWhen(1,F-X*D*N<Cum(1),R+I*7.5);
X:=LastValue(Cum(If(q1>=(R+I*8) AND q1<(R+I*9) AND
A,V,0))/B);
ValueWhen(1,F-X*D*N<Cum(1),R+I*8.5);
X:=LastValue(Cum(If(q1>=(R+I*9) AND q1<(R+I*10) AND
A,V,0))/B);
ValueWhen(1,F-X*D*N<Cum(1),R+I*9.5);
X:=LastValue(Cum(If(q1>=(R+I*10) AND q1<(R+I*11) AND
A,V,0))/B);
ValueWhen(1,F-X*D*N<Cum(1),R+I*10.5);
X:=LastValue(Cum(If(q1>=(R+I*11) AND q1<(R+I*12) AND
A,V,0))/B);
ValueWhen(1,F-X*D*N<Cum(1),R+I*11.5);
X:=LastValue(Cum(If(q1>=(R+I*12) AND q1<(R+I*13) AND
A,V,0))/B);
ValueWhen(1,F-X*D*N<Cum(1),R+I*12.5);
X:=LastValue(Cum(If(q1>=(R+I*13) AND q1<(R+I*14) AND
A,V,0))/B);
ValueWhen(1,F-X*D*N<Cum(1),R+I*13.5);
X:=LastValue(Cum(If(q1>=(R+I*14) AND q1<(R+I*15) AND
A,V,0))/B);
ValueWhen(1,F-X*D*N<Cum(1),R+I*14.5);
X:=LastValue(Cum(If(q1>=(R+I*15) AND q1<(R+I*16) AND
A,V,0))/B);
ValueWhen(1,F-X*D*N<Cum(1),R+I*15.5);
X:=LastValue(Cum(If(q1>=(R+I*16) AND q1<(R+I*17) AND
A,V,0))/B);
ValueWhen(1,F-X*D*N<Cum(1),R+I*16.5);
X:=LastValue(Cum(If(q1>=(R+I*17) AND q1<(R+I*18) AND
A,V,0))/B);
ValueWhen(1,F-X*D*N<Cum(1),R+I*17.5);
X:=LastValue(Cum(If(q1>=(R+I*18) AND q1<(R+I*19) AND
A,V,0))/B);
ValueWhen(1,F-X*D*N<Cum(1),R+I*18.5);
X:=LastValue(Cum(If(q1>=(R+I*19) AND q1<(R+I*20) AND
A,V,0))/B);
ValueWhen(1,F-Int(X*D*N)=Cum(1),R+I*19.5);


{vap-B}
q2:=input(“precision”,1,9,5);
q3:=input(“select segment”,1,9,5);
q1:=(l+((h-l)/q2)*q3);
D:=Input("Set Colour and Style",0,0,0);
D:=FmlVar("vap-A","D");
N:=FmlVar("vap-A","N");
F:=LastValue(Cum(1));
A:=F-D<Cum(1);
B:=LastValue(Cum(If(A,V,0)));
Q:=LastValue(HighestSince(1,A=0,C));
R:=LastValue(LowestSince(1,A=0,C));
I:=(Q-R)/96;  K:=.5;
X:=LastValue(Cum(If(q1>=(R+I*20) AND q1<(R+I*21) AND
A,V,0))/B);
ValueWhen(1,F-X*D*N<Cum(1),R+I*(20+K));
X:=LastValue(Cum(If(q1>=(R+I*21) AND q1<(R+I*22) AND
A,V,0))/B);
ValueWhen(1,F-X*D*N<Cum(1),R+I*(21+K));
X:=LastValue(Cum(If(q1>=(R+I*22) AND q1<(R+I*23) AND
A,V,0))/B);
ValueWhen(1,F-X*D*N<Cum(1),R+I*(22+K));
X:=LastValue(Cum(If(q1>=(R+I*23) AND q1<(R+I*24) AND
A,V,0))/B);
ValueWhen(1,F-X*D*N<Cum(1),R+I*(23+K));
X:=LastValue(Cum(If(q1>=(R+I*24) AND q1<(R+I*25) AND
A,V,0))/B);
ValueWhen(1,F-X*D*N<Cum(1),R+I*(24+K));
X:=LastValue(Cum(If(q1>=(R+I*25) AND q1<(R+I*26) AND
A,V,0))/B);
ValueWhen(1,F-X*D*N<Cum(1),R+I*(25+K));
X:=LastValue(Cum(If(q1>=(R+I*26) AND q1<(R+I*27) AND
A,V,0))/B);
ValueWhen(1,F-X*D*N<Cum(1),R+I*(26+K));
X:=LastValue(Cum(If(q1>=(R+I*27) AND q1<(R+I*28) AND
A,V,0))/B);
ValueWhen(1,F-X*D*N<Cum(1),R+I*(27+K));
X:=LastValue(Cum(If(q1>=(R+I*28) AND q1<(R+I*29) AND
A,V,0))/B);
ValueWhen(1,F-X*D*N<Cum(1),R+I*(28+K));
X:=LastValue(Cum(If(q1>=(R+I*29) AND q1<(R+I*30) AND
A,V,0))/B);
ValueWhen(1,F-X*D*N<Cum(1),R+I*(29+K));
X:=LastValue(Cum(If(q1>=(R+I*30) AND q1<(R+I*31) AND
A,V,0))/B);
ValueWhen(1,F-X*D*N<Cum(1),R+I*(30+K));
X:=LastValue(Cum(If(q1>=(R+I*31) AND q1<(R+I*32) AND
A,V,0))/B);
ValueWhen(1,F-X*D*N<Cum(1),R+I*(31+K));
X:=LastValue(Cum(If(q1>=(R+I*32) AND q1<(R+I*33) AND
A,V,0))/B);
ValueWhen(1,F-X*D*N<Cum(1),R+I*(32+K));
X:=LastValue(Cum(If(q1>=(R+I*33) AND q1<(R+I*34) AND
A,V,0))/B);
ValueWhen(1,F-X*D*N<Cum(1),R+I*(33+K));
X:=LastValue(Cum(If(q1>=(R+I*34) AND q1<(R+I*35) AND
A,V,0))/B);
ValueWhen(1,F-X*D*N<Cum(1),R+I*(34+K));
X:=LastValue(Cum(If(q1>=(R+I*35) AND q1<(R+I*36) AND
A,V,0))/B);
ValueWhen(1,F-X*D*N<Cum(1),R+I*(35+K));
X:=LastValue(Cum(If(q1>=(R+I*36) AND q1<(R+I*37) AND
A,V,0))/B);
ValueWhen(1,F-X*D*N<Cum(1),R+I*(36+K));
X:=LastValue(Cum(If(q1>=(R+I*37) AND q1<(R+I*38) AND
A,V,0))/B);
ValueWhen(1,F-X*D*N<Cum(1),R+I*(37+K));
X:=LastValue(Cum(If(q1>=(R+I*38) AND q1<(R+I*39) AND
A,V,0))/B);
ValueWhen(1,F-X*D*N<Cum(1),R+I*(38+K));
X:=LastValue(Cum(If(q1>=(R+I*39) AND q1<(R+I*40) AND
A,V,0))/B);
ValueWhen(1,F-Int(X*D*N)=Cum(1),R+I*39.5);




{ vap-C}
q2:=input(“precision”,1,9,5);
q3:=input(“select segment”,1,9,5);
q1:=(l+((h-l)/q2)*q3);
D:=Input("Set Colour and Style",0,0,0);
D:=FmlVar("vap-b","D");
N:=FmlVar("vap-b","N");
F:=LastValue(Cum(1));
A:=F-D<Cum(1);
B:=LastValue(Cum(If(A,V,0)));
Q:=LastValue(HighestSince(1,A=0,C));
R:=LastValue(LowestSince(1,A=0,C));
I:=(Q-R)/96;  K:=.5;
X:=LastValue(Cum(If(q1>=(R+I*40) AND q1<(R+I*41) AND
A,V,0))/B);
ValueWhen(1,F-X*D*N<Cum(1),R+I*(40+K));
X:=LastValue(Cum(If(q1>=(R+I*41) AND q1<(R+I*42) AND
A,V,0))/B);
ValueWhen(1,F-X*D*N<Cum(1),R+I*(41+K));
X:=LastValue(Cum(If(q1>=(R+I*42) AND q1<(R+I*43) AND
A,V,0))/B);
ValueWhen(1,F-X*D*N<Cum(1),R+I*(42+K));
X:=LastValue(Cum(If(q1>=(R+I*43) AND q1<(R+I*44) AND
A,V,0))/B);
ValueWhen(1,F-X*D*N<Cum(1),R+I*(43+K));
X:=LastValue(Cum(If(q1>=(R+I*44) AND q1<(R+I*45) AND
A,V,0))/B);
ValueWhen(1,F-X*D*N<Cum(1),R+I*(44+K));
X:=LastValue(Cum(If(q1>=(R+I*45) AND q1<(R+I*46) AND
A,V,0))/B);
ValueWhen(1,F-X*D*N<Cum(1),R+I*(45+K));
X:=LastValue(Cum(If(q1>=(R+I*46) AND q1<(R+I*47) AND
A,V,0))/B);
ValueWhen(1,F-X*D*N<Cum(1),R+I*(46+K));
X:=LastValue(Cum(If(q1>=(R+I*47) AND q1<(R+I*48) AND
A,V,0))/B);
ValueWhen(1,F-X*D*N<Cum(1),R+I*(47+K));
X:=LastValue(Cum(If(q1>=(R+I*48) AND q1<(R+I*49) AND
A,V,0))/B);
ValueWhen(1,F-X*D*N<Cum(1),R+I*(48+K));
X:=LastValue(Cum(If(q1>=(R+I*49) AND q1<(R+I*50) AND
A,V,0))/B);
ValueWhen(1,F-X*D*N<Cum(1),R+I*(49+K));
X:=LastValue(Cum(If(q1>=(R+I*50) AND q1<(R+I*51) AND
A,V,0))/B);
ValueWhen(1,F-X*D*N<Cum(1),R+I*(50+K));
X:=LastValue(Cum(If(q1>=(R+I*51) AND q1<(R+I*52) AND
A,V,0))/B);
ValueWhen(1,F-X*D*N<Cum(1),R+I*(51+K));
X:=LastValue(Cum(If(q1>=(R+I*52) AND q1<(R+I*53) AND
A,V,0))/B);
ValueWhen(1,F-X*D*N<Cum(1),R+I*(52+K));
X:=LastValue(Cum(If(q1>=(R+I*53) AND q1<(R+I*54) AND
A,V,0))/B);
ValueWhen(1,F-X*D*N<Cum(1),R+I*(53+K));
X:=LastValue(Cum(If(q1>=(R+I*54) AND q1<(R+I*55) AND
A,V,0))/B);
ValueWhen(1,F-X*D*N<Cum(1),R+I*(54+K));
X:=LastValue(Cum(If(q1>=(R+I*55) AND q1<(R+I*56) AND
A,V,0))/B);
ValueWhen(1,F-X*D*N<Cum(1),R+I*(55+K));
X:=LastValue(Cum(If(q1>=(R+I*56) AND q1<(R+I*57) AND
A,V,0))/B);
ValueWhen(1,F-X*D*N<Cum(1),R+I*(56+K));
X:=LastValue(Cum(If(q1>=(R+I*57) AND q1<(R+I*58) AND
A,V,0))/B);
ValueWhen(1,F-X*D*N<Cum(1),R+I*(57+K));
X:=LastValue(Cum(If(q1>=(R+I*58) AND q1<(R+I*59) AND
A,V,0))/B);
ValueWhen(1,F-Int(X*D*N)=Cum(1),R+I*58.5);






{ vap-D}
q2:=input(“precision”,1,9,5);
q3:=input(“select segment”,1,9,5);
q1:=(l+((h-l)/q2)*q3);
D:=Input("Set Colour and Style",0,0,0);
D:=FmlVar("vap-c","D");
N:=FmlVar("vap-c","N");
F:=LastValue(Cum(1));
A:=F-D<Cum(1);
B:=LastValue(Cum(If(A,V,0)));
Q:=LastValue(HighestSince(1,A=0,C));
R:=LastValue(LowestSince(1,A=0,C));
I:=(Q-R)/96;  K:=.5;
X:=LastValue(Cum(If(q1>=(R+I*59) AND q1<(R+I*60) AND
A,V,0))/B);
ValueWhen(1,F-X*D*N<Cum(1),R+I*(59+K));
X:=LastValue(Cum(If(q1>=(R+I*60) AND q1<(R+I*61) AND
A,V,0))/B);
ValueWhen(1,F-X*D*N<Cum(1),R+I*(60+K));
X:=LastValue(Cum(If(q1>=(R+I*61) AND q1<(R+I*62) AND
A,V,0))/B);
ValueWhen(1,F-X*D*N<Cum(1),R+I*(61+K));
X:=LastValue(Cum(If(q1>=(R+I*62) AND q1<(R+I*63) AND
A,V,0))/B);
ValueWhen(1,F-X*D*N<Cum(1),R+I*(62+K));
X:=LastValue(Cum(If(q1>=(R+I*63) AND q1<(R+I*64) AND
A,V,0))/B);
ValueWhen(1,F-X*D*N<Cum(1),R+I*(63+K));
X:=LastValue(Cum(If(q1>=(R+I*64) AND q1<(R+I*65) AND
A,V,0))/B);
ValueWhen(1,F-X*D*N<Cum(1),R+I*(64+K));
X:=LastValue(Cum(If(q1>=(R+I*65) AND q1<(R+I*66) AND
A,V,0))/B);
ValueWhen(1,F-X*D*N<Cum(1),R+I*(65+K));
X:=LastValue(Cum(If(q1>=(R+I*66) AND q1<(R+I*67) AND
A,V,0))/B);
ValueWhen(1,F-X*D*N<Cum(1),R+I*(66+K));
X:=LastValue(Cum(If(q1>=(R+I*67) AND q1<(R+I*68) AND
A,V,0))/B);
ValueWhen(1,F-X*D*N<Cum(1),R+I*(67+K));
X:=LastValue(Cum(If(q1>=(R+I*68) AND q1<(R+I*69) AND
A,V,0))/B);
ValueWhen(1,F-X*D*N<Cum(1),R+I*(68+K));
X:=LastValue(Cum(If(q1>=(R+I*69) AND q1<(R+I*70) AND
A,V,0))/B);
ValueWhen(1,F-X*D*N<Cum(1),R+I*(69+K));
X:=LastValue(Cum(If(q1>=(R+I*70) AND q1<(R+I*71) AND
A,V,0))/B);
ValueWhen(1,F-X*D*N<Cum(1),R+I*(70+K));
X:=LastValue(Cum(If(q1>=(R+I*71) AND q1<(R+I*72) AND
A,V,0))/B);
ValueWhen(1,F-X*D*N<Cum(1),R+I*(71+K));
X:=LastValue(Cum(If(q1>=(R+I*72) AND q1<(R+I*73) AND
A,V,0))/B);
ValueWhen(1,F-X*D*N<Cum(1),R+I*(72+K));
X:=LastValue(Cum(If(q1>=(R+I*73) AND q1<(R+I*74) AND
A,V,0))/B);
ValueWhen(1,F-X*D*N<Cum(1),R+I*(73+K));
X:=LastValue(Cum(If(q1>=(R+I*74) AND q1<(R+I*75) AND
A,V,0))/B);
ValueWhen(1,F-X*D*N<Cum(1),R+I*(74+K));
X:=LastValue(Cum(If(q1>=(R+I*75) AND q1<(R+I*76) AND
A,V,0))/B);
ValueWhen(1,F-X*D*N<Cum(1),R+I*(75+K));
X:=LastValue(Cum(If(q1>=(R+I*76) AND q1<(R+I*77) AND
A,V,0))/B);
ValueWhen(1,F-X*D*N<Cum(1),R+I*(76+K));
X:=LastValue(Cum(If(q1>=(R+I*77) AND q1<(R+I*78) AND
A,V,0))/B);
ValueWhen(1,F-Int(X*D*N)=Cum(1),R+I*77.5);







{ vap-E}
q2:=input(“precision”,1,9,5);
q3:=input(“select segment”,1,9,5);
q1:=(l+((h-l)/q2)*q3);
D:=Input("Set Colour and Style",0,0,0);
D:=FmlVar("vap-d","D");
N:=FmlVar("vap-d","N");
F:=LastValue(Cum(1));
A:=F-D<Cum(1);
B:=LastValue(Cum(If(A,V,0)));
Q:=LastValue(HighestSince(1,A=0,C));
R:=LastValue(LowestSince(1,A=0,C));
I:=(Q-R)/96;  K:=.5;
X:=LastValue(Cum(If(q1>=(R+I*78) AND q1<(R+I*79) AND
A,V,0))/B);
ValueWhen(1,F-X*D*N<Cum(1),R+I*(78+K));
X:=LastValue(Cum(If(q1>=(R+I*79) AND q1<(R+I*80) AND
A,V,0))/B);
ValueWhen(1,F-X*D*N<Cum(1),R+I*(79+K));
X:=LastValue(Cum(If(q1>=(R+I*80) AND q1<(R+I*81) AND
A,V,0))/B);
ValueWhen(1,F-X*D*N<Cum(1),R+I*(80+K));
X:=LastValue(Cum(If(q1>=(R+I*81) AND q1<(R+I*82) AND
A,V,0))/B);
ValueWhen(1,F-X*D*N<Cum(1),R+I*(81+K));
X:=LastValue(Cum(If(q1>=(R+I*82) AND q1<(R+I*83) AND
A,V,0))/B);
ValueWhen(1,F-X*D*N<Cum(1),R+I*(82+K));
X:=LastValue(Cum(If(q1>=(R+I*83) AND q1<(R+I*84) AND
A,V,0))/B);
ValueWhen(1,F-X*D*N<Cum(1),R+I*(83+K));
X:=LastValue(Cum(If(q1>=(R+I*84) AND q1<(R+I*85) AND
A,V,0))/B);
ValueWhen(1,F-X*D*N<Cum(1),R+I*(84+K));
X:=LastValue(Cum(If(q1>=(R+I*85) AND q1<(R+I*86) AND
A,V,0))/B);
ValueWhen(1,F-X*D*N<Cum(1),R+I*(85+K));
X:=LastValue(Cum(If(q1>=(R+I*86) AND q1<(R+I*87) AND
A,V,0))/B);
ValueWhen(1,F-X*D*N<Cum(1),R+I*(86+K));
X:=LastValue(Cum(If(q1>=(R+I*87) AND q1<(R+I*88) AND
A,V,0))/B);
ValueWhen(1,F-X*D*N<Cum(1),R+I*(87+K));
X:=LastValue(Cum(If(q1>=(R+I*88) AND q1<(R+I*89) AND
A,V,0))/B);
ValueWhen(1,F-X*D*N<Cum(1),R+I*(88+K));
X:=LastValue(Cum(If(q1>=(R+I*89) AND q1<(R+I*90) AND
A,V,0))/B);
ValueWhen(1,F-X*D*N<Cum(1),R+I*(89+K));
X:=LastValue(Cum(If(q1>=(R+I*90) AND q1<(R+I*91) AND
A,V,0))/B);
ValueWhen(1,F-X*D*N<Cum(1),R+I*(90+K));
X:=LastValue(Cum(If(q1>=(R+I*91) AND q1<(R+I*92) AND
A,V,0))/B);
ValueWhen(1,F-X*D*N<Cum(1),R+I*(91+K));
X:=LastValue(Cum(If(q1>=(R+I*92) AND q1<(R+I*93) AND
A,V,0))/B);
ValueWhen(1,F-X*D*N<Cum(1),R+I*(92+K));
X:=LastValue(Cum(If(q1>=(R+I*93) AND q1<(R+I*94) AND
A,V,0))/B);
ValueWhen(1,F-X*D*N<Cum(1),R+I*(93+K));
X:=LastValue(Cum(If(q1>=(R+I*94) AND q1<(R+I*95) AND
A,V,0))/B);
ValueWhen(1,F-X*D*N<Cum(1),R+I*(94+K));
X:=LastValue(Cum(If(q1>=(R+I*95) AND q1<(R+I*96) AND
A,V,0))/B);
ValueWhen(1,F-X*D*N<Cum(1),R+I*(95+K));
X:=LastValue(Cum(If(q1>=(R+I*96) AND A,V,0))/b);
ValueWhen(1,F-Int(X*D*N)=Cum(1),R+I*(96+K));



__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Ink Cartridges or Refill Kits for Your HP, Epson, Canon or Lexmark
Printer at Myinks.com. Free s/h on orders $50 or more to the US & Canada. http://www.c1tracking.com/l.asp?cid=5511
http://us.click.yahoo.com/l.m7sD/LIdGAA/qnsNAA/BefplB/TM
---------------------------------------------------------------------~->

To unsubscribe from this group, send an email to:
equismetastock-unsubscribe@xxxxxxxxxxxxxxx

 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/