Här är en variant på VAP-indikatorn, den här väger ihop instrumentet man står på med DAX, Nasdaq100 och Dow Jones, så att man får en mycket bredare bild av marknadens volla.
Exempelt nedan är kört på OMXS30.
Kod:
$par1:=75
$par2:=25
volla1=sub(1,div(aref(c,1),c))
ma50_1=mov(volla1,50,s)
bbl2k_1=sub(ma50_1,mult(2.5,stdev(volla1,1000)))
bbl50_1=sub(ma50_1,mult(2,stdev(volla1,50)))
diff_1=sub(bbl50_1,bbl2k_1)
rating1_1=mult(1,sum(gt(diff_1,aref(diff_1,1)),50))
rating2_1=mult(50,sub(1,div(abs(diff_1),bbl2k_1)))
rating3_1=mx(0,mn(100,mult(sub(add(rating1_1,rating2_1),70),2)))
dax=cmpref(c,0,a)
volla2=sub(1,div(aref(dax,1),dax))
ma50_2=mov(volla2,50,s)
bbl2k_2=sub(ma50_2,mult(2.5,stdev(volla2,1000)))
bbl50_2=sub(ma50_2,mult(2,stdev(volla2,50)))
diff_2=sub(bbl50_2,bbl2k_2)
rating1_2=mult(1,sum(gt(diff_2,aref(diff_2,1)),50))
rating2_2=mult(50,sub(1,div(abs(diff_2),bbl2k_2)))
rating3_2=mx(0,mn(100,mult(sub(add(rating1_2,rating2_2),70),2)))
dow=cmpref(c,0,b)
volla3=sub(1,div(aref(dow,1),dow))
ma50_3=mov(volla3,50,s)
bbl2k_3=sub(ma50_3,mult(2.5,stdev(volla3,1000)))
bbl50_3=sub(ma50_3,mult(2,stdev(volla3,50)))
diff_3=sub(bbl50_3,bbl2k_3)
rating1_3=mult(1,sum(gt(diff_3,aref(diff_3,1)),50))
rating2_3=mult(50,sub(1,div(abs(diff_3),bbl2k_3)))
rating3_3=mx(0,mn(100,mult(sub(add(rating1_3,rating2_3),70),2)))
n100=cmpref(c,0,c)
volla4=sub(1,div(aref(n100,1),n100))
ma50_4=mov(volla4,50,s)
bbl2k_4=sub(ma50_4,mult(2.5,stdev(volla4,1000)))
bbl50_4=sub(ma50_4,mult(2,stdev(volla4,50)))
diff_4=sub(bbl50_4,bbl2k_4)
rating1_4=mult(1,sum(gt(diff_4,aref(diff_4,1)),50))
rating2_4=mult(50,sub(1,div(abs(diff_4),bbl2k_4)))
rating3_4=mx(0,mn(100,mult(sub(add(rating1_4,rating2_4),70),2)))
gvap=div(add(add(rating3_1,rating3_2),add(rating3_3,rating3_4)),4)
köp=gt(gvap,$par1)
sälj=lt(gvap,$par2)
draw($par2,1,rsdw2)
draw($par1,2,dgsdw2)
draw(köp,3,dgadfw1)
draw(sälj,4,radfw1)
draw(add(add(volla1,volla2),add(volla3,volla4)),5,dcaa)
add(0,gvap)
{@A(0,B-IDX-DAXI)@B(0,Dow Jones )@C(0,Nasdaq Com)}
Exempelt nedan är kört på OMXS30.
Kod:
$par1:=75
$par2:=25
volla1=sub(1,div(aref(c,1),c))
ma50_1=mov(volla1,50,s)
bbl2k_1=sub(ma50_1,mult(2.5,stdev(volla1,1000)))
bbl50_1=sub(ma50_1,mult(2,stdev(volla1,50)))
diff_1=sub(bbl50_1,bbl2k_1)
rating1_1=mult(1,sum(gt(diff_1,aref(diff_1,1)),50))
rating2_1=mult(50,sub(1,div(abs(diff_1),bbl2k_1)))
rating3_1=mx(0,mn(100,mult(sub(add(rating1_1,rating2_1),70),2)))
dax=cmpref(c,0,a)
volla2=sub(1,div(aref(dax,1),dax))
ma50_2=mov(volla2,50,s)
bbl2k_2=sub(ma50_2,mult(2.5,stdev(volla2,1000)))
bbl50_2=sub(ma50_2,mult(2,stdev(volla2,50)))
diff_2=sub(bbl50_2,bbl2k_2)
rating1_2=mult(1,sum(gt(diff_2,aref(diff_2,1)),50))
rating2_2=mult(50,sub(1,div(abs(diff_2),bbl2k_2)))
rating3_2=mx(0,mn(100,mult(sub(add(rating1_2,rating2_2),70),2)))
dow=cmpref(c,0,b)
volla3=sub(1,div(aref(dow,1),dow))
ma50_3=mov(volla3,50,s)
bbl2k_3=sub(ma50_3,mult(2.5,stdev(volla3,1000)))
bbl50_3=sub(ma50_3,mult(2,stdev(volla3,50)))
diff_3=sub(bbl50_3,bbl2k_3)
rating1_3=mult(1,sum(gt(diff_3,aref(diff_3,1)),50))
rating2_3=mult(50,sub(1,div(abs(diff_3),bbl2k_3)))
rating3_3=mx(0,mn(100,mult(sub(add(rating1_3,rating2_3),70),2)))
n100=cmpref(c,0,c)
volla4=sub(1,div(aref(n100,1),n100))
ma50_4=mov(volla4,50,s)
bbl2k_4=sub(ma50_4,mult(2.5,stdev(volla4,1000)))
bbl50_4=sub(ma50_4,mult(2,stdev(volla4,50)))
diff_4=sub(bbl50_4,bbl2k_4)
rating1_4=mult(1,sum(gt(diff_4,aref(diff_4,1)),50))
rating2_4=mult(50,sub(1,div(abs(diff_4),bbl2k_4)))
rating3_4=mx(0,mn(100,mult(sub(add(rating1_4,rating2_4),70),2)))
gvap=div(add(add(rating3_1,rating3_2),add(rating3_3,rating3_4)),4)
köp=gt(gvap,$par1)
sälj=lt(gvap,$par2)
draw($par2,1,rsdw2)
draw($par1,2,dgsdw2)
draw(köp,3,dgadfw1)
draw(sälj,4,radfw1)
draw(add(add(volla1,volla2),add(volla3,volla4)),5,dcaa)
add(0,gvap)
{@A(0,B-IDX-DAXI)@B(0,Dow Jones )@C(0,Nasdaq Com)}
Comment