VPA Rank

A forum for all EdgeRater users

Moderator: Chris White

Post Reply
henry1224
Posts: 457
Joined: Wed Feb 24, 2016 12:04 pm

VPA Rank

Post by henry1224 »

I was going through the HGSI VPA PDF and decided to code the VPA signal into Edgerater.

here is what I came up with, but I don't seem to find any trading value in it. Your comments and opinions would be helpful

It takes into consideration Volume, Spread Size, and close vs Spread

Under the parameters tab

RA1 Double 3 0 100
RA2 Double 10 0 200


Under the scripts tab here is the code


VA:=SMA(V,90);
SDVA:=STD(VA,90);
VCon1:=if(V>(2*VA),5,0);
VCon2:=If(VCon1 == 0 & V>(1.3*VA),4,0);
VCon3:=If(VCon1 ==0 & VCon2 ==0 & V> VA,3,0);
VCon4:=If(VCon1 ==0 & VCon2 == 0 & VCon3 ==0 & V<VA & V>(VA*.7),2,0);
VCon5:=If(VCon1==0 & VCon2 ==0 & VCon3 ==0 & VCon4 ==0 & V< (VA-SDVA),1,0);
VT:=(VCon1+VCon2+VCon3+VCon4+VCon5);

SPRD:=H-L;
SA:=SMA(SPRD,90);
SCon1:=if(SPRD>(1.5*SA),5,0);
SCon2:=If(SCon1 == 0 & SPRD>SA,4,0);
SCon3:=If(SCon1 ==0 & SCon2 ==0 & SPRD < SA & SPRD >(SA*.7),3,0);
SCon4:=If(SCon1 ==0 & SCon2 == 0 & VCon3 ==0 & SPRD>(SA*.5) & SPRD<(SA*.7),2,0);
SCon5:=If(SCon1==0 & SCon2 ==0 & SCon3 ==0 & SCon4 ==0 & SPRD< (SA*.5),1,0);
ST:=(SCon1+SCon2+SCon3+SCon4+SCon5);

CCon1:=If(C>(SPRD*.75)+L,4,0);
CCon2:=If(CCon1 ==0 & C>(SPRD*.7)+L,3,0);
CCon3:=If(CCon1 ==0 & CCon2 ==0 & C>(SPRD*.3)+L & C<(SPRD*.7)+L,2,0);
CCon4:=If(CCon1 ==0 & CCon2 ==0 & CCon3==0 & C<(SPRD*.3)+L,1,0);
CT:=(CCon1+CCon2+CCon3+CCon4);
RNK:(VT*ST*CT),Width2,ColorBlue;
RNKA:SMA(RNK,RA1),Width2,ColorGreen;
RNKA2:SMA(RNK,RA2),Width2,ColorRed;
FillRgn(RNKA>RNKA2,RNKA,RNKA2),Brush#5000FF00;
FillRgn(RNKA<RNKA2,RNKA,RNKA2),Brush#50FF0000;
Post Reply