Metastock Formulas S 1


Metastock Formulas - S 1 Strona 1
Metastock Formulas - S 1
Click here to go back to Metastock Formula Inex
Home
These formulas aren't my complete
IMPORTANT:
MetaStock Secrets
collectlon. For my complete collectlon of lnstantly usable,
Free MS Newsletter
profltable and powerful MetaStock formulas Cllck Here
Free MS Formula
Buy MetaStock
Buy MS Formulas
Would You Llke To Use MetaStock To Its Full Potentlal? Dlscover the
Amazlngly Slmple Secret to Master Metastock Step-By-Step - click here
FREE Vldeos
MS Back Testlng
A | A 1 | B | B 1 | C | C 1 | D | D 1 | E | F | G | H | I | J | K | L | M | M 1 | N
Tradlng Systems
| O | P | R | S | S 1 | T | U | V | W | Z |
Nlcolas Darvas
Stock Rhythm System
MetaStock Llnks
Schaff Trend Cycle Oscillator
Signal accumulator
Rave Revlews
Siroc
Smart System design - Long
About Us
Stock Rhythm System
Contact Us
SlteMap
In Jeffrey Owen Katz's artIcIe "TradIng stocks wIth a cycIIcaI system" he Introduces the
Stock Rhythm System. In MetaStock 6.5, or hIgher, you can easIIy create thIs system. WIth
MetaStock runnIng choose "System Tester" from the TooIs menu, cIIck on the New button
and enter the foIIowIng formuIas:
Signal Formulas
Enter Long
thresh:= 4;
k:= 3;
m:= 63;
VaIue1:= Stdev(Ref(ROC(C,k,$),-m),20);
VaIue2:= Ref(ROC(C,k,$),-m);
When(VaIue2 > thresh*VaIue1)
Close Long
thresh:= 4;
k:= 3;
m:= 63;
VaIue1:= Stdev(Ref(ROC(C,k,$),-m),20);
VaIue2:= Ref(ROC(C,k,$),-m);
When(VaIue2 <-thresh*VaIue1)
Stops
InactIvIty PosItIons - Long and Short Method - PoInts MInImum Change - 15000
PerIods - 10
After enterIng the formuIas cIIck OK, then cIIck on OptIons. On the TestIng page set the
Trade DeIay to 0, set PosItIons to Both, then set any other desIred optIons CIIck OK to save
the changes, then open a chart and run the system.
(Go Top...)
Schaff Trend Cycle Oscillator
{ Schaff Trend CycIe OscIIIator v1.0 }{ AutomatIc trIgger IeveIs }{ AIso see: "MACD
oscIIIator - Schaff Trend CycIe" }{ josesIIva22@yahoo.com }{ WIth thanks to TIm StraIton,
www.stopIoss.ch }
{ varIabIes Input }
pdsCy:=Input("Schaff cycIe perIods",2,252,10);
http://www.meta-formula.com/Metastock-Formulas-S1.html 2014-10-14 14:05:34
Metastock Formulas - S 1 Strona 2
pdsSh:=Input("Short perIods",1,252,10);
pdsLg:=Input("Long perIods",2,2520,21);
{ Schaff Trend CycIe }
MCD:=WIIders(MP(),pdsSh)-WIIders(MP(),pdsLg);
ST:=(MCD-LLV(MCD,pdsCy))
/(HHV(MCD,pdsCy)-LLV(MCD,pdsCy))*100;
STC:=WIIders(ST,pdsCy/2);
{ automatIc trIgger IeveIs }
pk:=Ref(STC,-1)>STC AND Ref(STC,-1)>Ref(STC,-2);
pkVaI:=If(pk,Ref(STC,-1),0);
pkAvg:=Cum(pkVaI)/(Cum(pk)+.000001);
pkAvg:=If(pkAvg=0,100,pkAvg);
tr:=Ref(STC,-1)trVaI:=If(tr,Ref(STC,-1),0);
trAvg:=Cum(trVaI)/(Cum(tr)+.000001);
{ pIot on own wIndow }
pkAvg;trAvg;STC
Schaff Trend Cycle Indicator
{ Schaff Trend CycIe IndIcator v1.0 }{ AutomatIc trIgger IeveIs }{ AIso see: "MACD oscIIIator
- Schaff Trend CycIe" }{ josesIIva22@yahoo.com }{ WIth thanks to TIm StraIton,
www.stopIoss.ch }
{ varIabIes Input }
buffer:=Input("Long/Short buffer zone %",
0,100,0)/100;
pdsCy:=Input("Schaff cycIe perIods",2,252,10);
pdsSh:=Input("Short perIods",1,252,10);
pdsLg:=Input("Long perIods",2,2520,21);
{ Schaff Trend CycIe }
MCD:=WIIders(MP(),pdsSh)-WIIders(MP(),pdsLg);
ST:=(MCD-LLV(MCD,pdsCy))
/(HHV(MCD,pdsCy)-LLV(MCD,pdsCy))*100;
STC:=WIIders(ST,pdsCy/2);
{ Schaff Trend CycIe }
MCD:=WIIders(MP(),pdsSh)-WIIders(MP(),pdsLg);
ST:=(MCD-LLV(MCD,pdsCy))
/(HHV(MCD,pdsCy)-LLV(MCD,pdsCy))*100;
STC:=WIIders(ST,pdsCy/2);
{ automatIc trIgger IeveIs }
pk:=Ref(STC,-1)>STC AND Ref(STC,-1)>Ref(STC,-2);
pkVaI:=If(pk,Ref(STC,-1),0);
pkAvg:=Cum(pkVaI)/(Cum(pk)+.000001);
pkAvg:=If(pkAvg=0,100,pkAvg);
tr:=Ref(STC,-1)trVaI:=If(tr,Ref(STC,-1),0);
trAvg:=Cum(trVaI)/(Cum(tr)+.000001);
{ STC crossover sIgnaIs }
In:=Cross(pkAvg,STC);
Out:=Cross(STC,trAvg);
InInIt:=Cum(In)=1;
InIt:=Cum(In+Out>-1)=1;
fIag:=BarsSInce(InIt OR In)
< BarsSInce(InIt OR Out)+InInIt;
sIgnaIs:=(InInIt AND AIert(InInIt=0,2)
OR fIag AND AIert(fIag=0,2))
-(fIag=0 AND AIert(fIag,2));
{ trend support/resIstance IeveIs }
STCI:=If(fIag,VaIueWhen(1,sIgnaIs,L*(1-buffer)),
VaIueWhen(1,sIgnaIs=-1 OR InIt,H*(1+buffer)));
{ aIternatIve STC crossover sIgnaIs method}
{bb:=BarsSInce(Cross(STC,trAvg));
bs:=BarsSInce(Cross(pkAvg,STC));
tb:=VaIueWhen(1,Cross(STC,trAvg),H*(1+buffer));
ts:=VaIueWhen(1,Cross(pkAvg,STC),L*(1-buffer));
STCI:=If(bb{ pIot on prIce chart }
STCI
(Go Top...)
Signal accumulator
http://www.meta-formula.com/Metastock-Formulas-S1.html 2014-10-14 14:05:34
Metastock Formulas - S 1 Strona 3
{ AccumuIates OBV/VoIume (or any other sIgnaIs) between & IncIudIng two user-Input
dates }
{sIgnaI to accumuIate - OBV}
x:=If(C>Ref(C,-1),V,If(C{sIgnaI to accumuIate - VoIume}
{x:=V;}
StDay:=Input("Start Day",1,31,1);
StMnth:=Input("start Month",1,12,10);
StYear:=Input("start Year",1960,2060,2003);
EnDay:=Input("End Day",1,31,31);
EnMnth:=Input("end Month",1,12,10);
EnYear:=Input("end Year",1960,2060,2003);
start:=Year()>StYear
OR (Year()=StYear AND (Month()>StMnth
OR Month()=StMnth AND DayOfMonth()>=StDay));
end:=Year()OR (Year()=EnYear AND (Month() OR Month()=EnMnth AND DayOfMonth()<=EnDay));
perIod:=start AND end;
If(perIod,Cum(If(perIod,x,0)),0)
(Go Top...)
Siroc
{ SIroc v2.0 }{ System1: trIgger crossovers }{ System2: auto over-bought/soId
crossovers }{ ©CopyrIght 2002-2004 Jose SIIva }{ josesIIva22@yahoo.com }
prd1:=Input("fIrst perIod",2,252,21);
prd2:=Input("second perIod",2,252,10);
prdCrs:=Input("crossover perIods",2,252,5);
x:=Input("use Open=1 HIgh=2 Low=3 CIose=4 MP=5 P=6",1,6,5);
pIot:=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,V,If(x=6,P,C)))));
Src:=Mov((x-Mov(x,prd1,E))
/Ref(Mov(x,prd1,E),-prd1),prd1,E);
prd2:=prd2*2-1;
y:=Src-Ref(Src,-1);
SIroc:=100-100/(1+If(Mov(
If(SrcMov(If(Src>Ref(Src,-1),y,0),prd2,E)
/(Mov(If(Src+.000001)));
SIrocAvg:=Cum(SIroc)/Cum(SIroc>-1);
{ AutomatIc peak/trough hIstorIcaI boundarIes }
pk:=Ref(SIroc,-1)>Ref(SIroc,-2)
AND Ref(SIroc,-1)>SIroc
AND Ref(SIroc,-1)>SIrocAvg;
pkVaI:=VaIueWhen(1,pk,Ref(SIroc,-1));
oBought:=Cum(pkVaI)/Cum(pkVaI>-1);
tr:=Ref(SIroc,-1)AND Ref(SIroc,-1)AND Ref(SIroc,-1)trVaI:=VaIueWhen(1,tr,Ref(SIroc,-1));
oSoId:=Cum(trVaI)/Cum(trVaI>-1);
{ System sIgnaIs }
dTrIgger:=Mov(SIroc,prdCrs,E);
System1:=
Cross(SIroc,dTrIgger)-Cross(dTrIgger,SIroc);
System2:=
Cross(SIroc,oSoId)-Cross(SIroc,oBought);
sIgnaIs:=If(pIot=2,System1,System2);
If(pIot=1,oBought,0);
If(pIot=1,oSoId,0);
If(pIot=1,dTrIgger,0);
If(pIot=1,SIroc,sIgnaIs)
Siroc II
{ SIroc II v2.0 }{ System1: trIgger crossovers }{ System2: auto over-bought/soId
crossovers }{ ©CopyrIght 2002-2004 Jose SIIva }{ josesIIva22@yahoo.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 CIose=4 MP=5 P=6",1,6,5);
http://www.meta-formula.com/Metastock-Formulas-S1.html 2014-10-14 14:05:34
Metastock Formulas - S 1 Strona 4
pIot:=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+.000001);
SIrocAvg:=Cum(SIroc)/Cum(SIroc>-1);
{ AutomatIc peak/trough hIstorIcaI boundarIes }
pk:=Ref(SIroc,-1)>Ref(SIroc,-2)
AND Ref(SIroc,-1)>SIroc
AND Ref(SIroc,-1)>SIrocAvg;
pkVaI:=VaIueWhen(1,pk,Ref(SIroc,-1));
oBought:=Cum(pkVaI)/Cum(pkVaI>-1);
tr:=Ref(SIroc,-1)AND Ref(SIroc,-1)AND Ref(SIroc,-1)trVaI:=VaIueWhen(1,tr,Ref(SIroc,-1));
oSoId:=Cum(trVaI)/Cum(trVaI>-1);
{ System sIgnaIs }
dTrIgger:=Mov(SIroc,prd3,E);
System1:=
Cross(SIroc,dTrIgger)-Cross(dTrIgger,SIroc);
System2:=
Cross(SIroc,oSoId)-Cross(SIroc,oBought);
sIgnaIs:=If(pIot=2,System1,System2);
If(pIot=1,oBought,0);
If(pIot=1,oSoId,0);
If(pIot=1,dTrIgger,0);
If(pIot=1,SIroc,sIgnaIs)
(Go Top...)
Smart System design - Long
{ SImpIe combIned Entry & ExIt system }{ PIots +1 spIke on entry, -1 on exIt sIgnaIs }
{ WarnIng: thIs tradIng system Is a desIgn exampIe onIy - do not trade! }{ ©CopyrIght 2003
Jose SIIva }{ josesIIva22@yahoo.com }
{*** user Input sectIon ***}
deIay:=1; {deIay entry/exIt x perIods}
pds:=Input("gIobaI entry/exIt perIods",
1,252,21);
En1:=Input("enabIe EMA entry",0,1,1);
En2:=Input("enabIe HHV entry",0,1,1);
Ex1:=Input("enabIe EMA exIt",0,1,1);
Ex2:=Input("enabIe LLV exIt",0,1,1);
Ex3:=Input("enabIe ATR exIt",0,1,1);
{*** pIace your entry/exIt condItIons here ***}
EntryCond1:=Cross(C,Mov(C,pds,E)*1.05);
EntryCond2:=Cross(C,Ref(HHV(C,pds),-1));
ExItCond1:=CExItCond2:=CExItCond3:=C{*** system IogIc sectIon ***}
En1:=If(En1,EntryCond1,0);
En2:=If(En2,EntryCond2,0);
Ex1:=If(Ex1,ExItCond1,0);
Ex2:=If(Ex2,ExItCond2,0);
Ex3:=If(Ex3,ExItCond3,0);
{*** system sIgnaIs IogIc sectIon ***}
In:=En1 OR En2;
Out:=Ex1 OR Ex2 OR Ex3;
InIt:=Cum(In+Out>-1)=1;
FIag:=BarsSInce(InIt OR In)
< BarsSInce(InIt OR Out)+(Cum(In)=1);
{*** system sIgnaIs dIspIay sectIon ***}
Ref(FIag AND AIert(FIag=0,2),-deIay)-
Ref((FIag=0 AND AIert(FIag,2)),-deIay)
http://www.meta-formula.com/Metastock-Formulas-S1.html 2014-10-14 14:05:34
Metastock Formulas - S 1 Strona 5
More advanced system developers:
Smart System Long Entry developer
{ PIots +1 spIke on Long entry sIgnaI }
{ WarnIng: thIs tradIng system Is a desIgn exampIe onIy - do not trade! }
{ ©CopyrIght 2003 Jose SIIva }
{ josesIIva22@yahoo.com }
{*** user Input sectIon ***}
pds:=Input("gIobaI entry perIods",1,252,21);
En1:=Input("enabIe EMA entry",0,1,1);
En2:=Input("enabIe HHV entry",0,1,1);
En3:=Input("enabIe ATR entry",0,1,1);
En4:=Input("enabIe WR% entry",0,1,1);
En5:=Input("enabIe CMF entry",0,1,1);
{*** pIace your entry Long condItIons here ***}
Entry1:=Cross(C,Mov(C,pds,E)*1.05);
Entry2:=Cross(C,Ref(HHV(C,pds),-1));
Entry3:=Cross(C,HHV(C-2.5*ATR(pds),pds));
Entry4:=Cross(WIIIR(pds),-50);
Entry5:=Cross(CMF(pds),0);
{*** system IogIc sectIon ***}
En1:=If(En1,Entry1,0);
En2:=If(En2,Entry2,0);
En3:=If(En3,Entry3,0);
En4:=If(En4,Entry4,0);
En5:=If(En5,Entry5,0);
entry:=En1 OR En2 OR En3 OR En4 OR En5;
{*** system entry output sectIon ***}
entry
Smart System Long Exit developer
{PIots -1 spIke on Long exIt sIgnaI}
{WarnIng: thIs tradIng system Is a desIgn exampIe onIy - do not trade!}
{©CopyrIght 2003 Jose SIIva}
{josesIIva22@yahoo.com}
{*** user Input sectIon ***}
pds:=Input("gIobaI exIt perIods",1,252,10);
Ex1:=Input("enabIe EMA exIt",0,1,1);
Ex2:=Input("enabIe LLV exIt",0,1,1);
Ex3:=Input("enabIe ATR exIt",0,1,1);
Ex4:=Input("enabIe WR% exIt",0,1,1);
Ex5:=Input("enabIe CMF exIt",0,1,1);
{*** pIace your exIt Long condItIons here ***}
ExIt1:=CExIt2:=CExIt3:=CExIt4:=WIIIR(pds)<-50;
ExIt5:=CMF(pds)<0;
{*** system IogIc sectIon ***}
Ex1:=If(Ex1,ExIt1,0);
Ex2:=If(Ex2,ExIt2,0);
Ex3:=If(Ex3,ExIt3,0);
Ex4:=If(Ex4,ExIt4,0);
Ex5:=If(Ex5,ExIt5,0);
exIt:=-(Ex1 OR Ex2 OR Ex3 OR Ex4 OR Ex5);
{*** system exIt output sectIon ***}
exIt
Smart System Long trade signals
{ PIots +1 on entry, -1 spIke on exIt sIgnaIs }{ Change user-Input defauIt settIngs wIthIn
code In referenced IndIcators: "Smart System Long Entry deveIoper" & "Smart System Long
ExIt deveIoper" }
{ WarnIng: thIs tradIng system Is a desIgn exampIe onIy - do not trade! }{ ©CopyrIght 2003
Jose SIIva }{ josesIIva22@yahoo.com }
deIay:=Input("Entry and ExIt deIay",0,5,0);
pIot:=Input("pIot: entry/exIt sIgnaIs=1, trade bInary=2",1,2,1);
http://www.meta-formula.com/Metastock-Formulas-S1.html 2014-10-14 14:05:34
Metastock Formulas - S 1 Strona 6
In:=FmI("Smart System Long Entry deveIoper");
Out:=FmI("Smart System Long ExIt deveIoper")=-1;
InIt:=Cum(In+Out>-1)=1;
InInIt:=Cum(In)=1;
fIag:=Ref(BarsSInce(InIt OR In)
< BarsSInce(InIt OR Out)+InInIt,-deIay);
In1:=Cum(Cum(In))=1;
Out1:=Cum(Cum(Out))=1;
sIgnaIs:=(InInIt AND AIert(InInIt=0,2)
OR fIag AND AIert(fIag=0,2))
-(fIag=0 AND AIert(fIag,2));
odd:=Cum(1)/2=Int(Cum(1)/2);
0;
Ref(If(pIot=1,In1,0),-deIay);
If(pIot=1,-Ref(Out1 AND BarsSInce(In1)
>=BarsSInce(Out1),-deIay),0);
If(pIot=1,0,If(odd,fIag,0));
If(pIot=1,sIgnaIs,fIag)
(Go Top...)
If you have Metastock formulas you would llke to share,
Please emall to
We look forwar to hearing from you!
To learn more about how to use Metastock and lts formula cllck here.
copyright 2003 MetaStock Website Home
Metastock® is a registered trademark of Equis International.
http://www.meta-formula.com/Metastock-Formulas-S1.html 2014-10-14 14:05:34


Wyszukiwarka

Podobne podstrony:
Metastock Formulas D 1
Metastock Formulas L
Metastock Formulas K
Metastock Formulas O
Metastock Formulas F
Metastock Formulas T
Metastock Formulas D
Metastock Formulas N
Metastock Formulas M 1
Metastock Formulas S
Metastock Formulas G
Metastock Formulas J
Metastock Formulas H
Metastock Formulas H
Metastock Formulas U
Metastock Formulas I
Metastock Formulas B 1
Metastock Formulas P

więcej podobnych podstron