MetaStock™ Zone Forum & FAQ Artykuły Linki Elliott Waves EasyLanguage™ Zone

 A B C D E F G H I J K L M N O P R S T U V W Y Z #

Siroc IV by Jose Silva
Interpretations of the Siroc indicator, with trigger & automatic over-bought/sold signals.

Siroc IV by Jose Silva

{ Siroc II v2.0 }
{ System1: trigger crossovers }
{ System2: auto over-bought/sold crossovers }
{ http://www.metastocktools.com }

prd1:=Input("first period",2,252,21);
prd2:=Input("second period",2,252,10);
prd3:=Input("crossover periods",2,252,5);
x:=Input("use Open=1 High=2 Low=3 Close=4 MP=5 P=6",1,6,5);
plot:=Input("[1]Siroc, [2]System1, [3]System3",1,3,1);

x:=If(x=1,O,If(x=2,H,If(x=3,L,If(x=5,MP(),If(x=6,P,C)))));
y:=Mov(x,prd1,E);
z:=Mov((x-y)/Ref(y,-prd1),prd2,E);

Siroc:=100
*Mov(If(z>Ref(z,-1),z-Ref(z,-1),0),prd3,E)
/(Mov(If(z>Ref(z,-1),z-Ref(z,-1),0),prd3,E)
+Mov(If(z<Ref(z,-1),Ref(z,-1)-z,0),prd3,E)
+.000001);
SirocAvg:=Cum(Siroc)/Cum(Siroc>-1);

{ Automatic peak/trough historical boundaries }
pk:=Ref(Siroc,-1)>Ref(Siroc,-2)
AND Ref(Siroc,-1)>Siroc
AND Ref(Siroc,-1)>SirocAvg;
pkVal:=ValueWhen(1,pk,Ref(Siroc,-1));
oBought:=Cum(pkVal)/Cum(pkVal>-1);
tr:=Ref(Siroc,-1)<Ref(Siroc,-2)
AND Ref(Siroc,-1)<Siroc
AND Ref(Siroc,-1)<SirocAvg;
trVal:=ValueWhen(1,tr,Ref(Siroc,-1));
oSold:=Cum(trVal)/Cum(trVal>-1);

{ System signals }
dTrigger:=Mov(Siroc,prd3,E);
System1:=
Cross(Siroc,dTrigger)-Cross(dTrigger,Siroc);
System2:=
Cross(Siroc,oSold)-Cross(Siroc,oBought);
signals:=If(plot=2,System1,System2);

If(plot=1,oBought,0);
If(plot=1,oSold,0);
If(plot=1,dTrigger,0);
If(plot=1,Siroc,signals)

Source / From: TOP
http://www.metastocktools.com

Equis and MetaStock® and MetaStock Professional® are registered trademarks of Equis International. Achelis Binary Wave®, The DownLoader®,
Expert Advisor®, OptionScope®, Quotecenter® and Smart Charts® are trademarks of Equis International, a Thomson Reuters company.