Metastock Formulas S


Metastock Formulas - S Strona 1
Metastock Formulas - S
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
Same Direction
Stochastic and RSI System
MetaStock Llnks
Setting up the ADX Template
Stochastic MA System
Shark-32 System, Walter Downs
Stochastic Momentum
Rave Revlews
Shark Pattern
Stochastic Momentum Indicator
Shifted TSMA Indicator
StochPVT Indicators
About Us
Short term horizontal trading ranges
Stoch RSI
Sideways Channels Exploration
Stop Loss Indicator
Signal Formulas
Contact Us
ST Oscillator
Sine Weighted Moving Average
Starc Band
SIROC Indicator From Elder
SlteMap
Support and Resistance
Slope of a Linear Regression Line
Support and Resistance Levels
Special Trix
System Test Examples
Stix Indicator
Stochastic %D
Short Volume Wave
Stochastic Wave Long
Slope of a Line
Stochastic Wave Short
Standard Error Bands for MetaStock for
Support and Resistance
Win
Smoothing Techniques for More
Simple Moving Average with Resistance
Accurate Signals
and Support
Same Direction
{It returns the number of perIods the cIose Is movIng In the same dIrectIon. A posItIve
number IndIcates ascendIng cIose prIces, a negatIve descendIng ones and zero unchanged
ones}
If(C>Ref(C,-1) AND Ref(C,-1)>Ref(C,-2),PREV+1,
If(CIf(C>Ref(C,-1) AND Ref(C,-1)<=Ref(C,-2),1,
If(C=Ref(C,-2),-1,
0))))
ThIs formuIa mIght be usefuI as a component of other IndIcators, systems or expIoratIons,
rather than as a stand-aIone IndIcator.
(Go Top)
Setting up the ADX Template
ThIs constructs the tempIate mentIoned In the ADX artIcIe of the October 1999 Issue of
TASC by PauI BabbItt.
1. Chart your stock/Index/whatever, usIng a "CIean" tempIate, then do the same agaIn, so
that the two overIappIng charts are dIspIayed.
2. On the menu bar, cIIck WIndows, then CoIumns. The two charts wIII then be dIspIayed
sIde-by-sIde.
3. Change the Ieft-hand chart from DaIIy to WeekIy. RIght cIIck on the date scaIe and seIect
X-AxIs. Set the dIspIayed range of dates to what you want, e.g., 1996 to 1999. Make sure
the Ioaded dates range starts earIIer. CIIck the MargIn tab and set the margIn to 1.
http://www.meta-formula.com/Metastock-Formulas-S.html 2014-10-14 14:05:25
Metastock Formulas - S Strona 2
4. From the IndIcator drop-down IIst seIect MovIng Average and drag It to the Ieft-hand
chart. A 40 perIod on the weekIy chart corresponds to a 200 day MA.
5. For the rIght-hand chart, Ieave It at a daIIy IntervaI but set the X-AxIs as In paragraph 3
above to, say, a 3-month dIspIay.
6. Drag the BoIIInger Band IndIcator to the rIght-hand chart.
7. Drag the DIrectIonaI Movement ADX IndIcator to the top of the rIght-hand chart untII the
cursor changes to a box, then reIease. Set the horIzontaI IInes as desIred.
8. SImIIarIy drag the RSI IndIcator to the bottom of the rIght-hand chart.
(Go Top)
Shark-32 System, Walter Downs
The Shark exIt sIgnaIs don't appear to be aII that good. In some cases, the seII sIgnaIs
provIde good opportunItIes for short-seIIIng, but the sIgnaIs appear to be too few and far
between to reIy on them for seII sIgnaIs for Iong trades. The Shark pattern occurs too
InfrequentIy, and there's no guarantee It'II occur when the trend reverses. WIth Iong trades,
you'd have to Iook to other IndIcators, such as CCI, as you say, or maybe ParaboIIc SAR. You
couId use prIce breakIng beIow certaIn movIng averages, too -- or movIng- average
crossovers.
Seems IIke entry but no exIts In Shark. maybe standard CCI(13) wIth 200 and -150
trIggers.
The shark pattern sIgnaIs, In the thIrd wIndow In the chart I sent, were reaIIy just aIerts
showIng that the shark pattern had occurred on those days. The shark system Is based on
the cIose rIsIng above IeveIs set when the shark pattern occurs. The IeveIs are set by the
hIgh and Iow In the shark pattern, and the cIose must break through them wIthIn 25 days of
the sIgnaI.
The shark pattern, In other words, Isn't a buy or seII sIgnaI. The buy sIgnaIs were shown In
the second wIndow of the chart I sent. The wIndow Is IabeIed "Shark buy sIgnaI." AIso, the
sIgnaIs are marked by green arrows over the prIce pIot In the fIrst wIndow of the chart. I
dIdn't IncIude seII sIgnaIs In the chart I sent earIIer today. In the case of MU, the seII sIgnaIs
weren't very good, to be honest.
The Shark system Is reaIIy based on two separate events: the occurrence of the pattern and
then the sIgnaI.
The pattern Isn't the sIgnaI. The system gIves a sIgnaI If and when the stock breaks above
the hIgh poInt In the pattern over the next 25 days. The hIgh on the fIrst day of the pattern
sets that hIgh poInt. It's IIke a resIstance IeveI, set by the hIghest poInt In the shark fIn.
SometImes the stock doesn't break above It, so there's no sIgnaI. The Shark pattern shows
consoIIdatIon, whIch may IndIcate an expansIon In prIce to come. But the breakout doesn't
aIways occur. If the stock breaks beIow the Iow poInt In the pattern, there's a seII sIgnaI.
The Idea behInd the system Is: Look for a three-bar shark pattern, based on progressIveIy
smaIIer ranges. It Iooks IIke a shark fIn. Once that pattern appears, a IeveI Is set by the
hIghest poInt In the fIn, whIch Is the hIgh(-2). In the scan, I caII that IeveI "SharkhIgh." To
get a buy sIgnaI, the prIce has to cIose above that IeveI wIthIn 25 days. If you want to pIot
"sharkhIgh" over a chart wIth the prIce, you can do It wIth the "BuyOK" part of the
Metastock formuIa by pIottIng thIs In the Expert AdvIser:
Symmetry:=.28;
Apex:=(H+L)/2;
WB:=Ref(H,-2)-Ref(L,-2);
Shark:=If((HRef(L,-1) AND Ref(H,-1)Ref(L,-1)>Ref(L,-2))=1,
{ try Ref(L,-1)>Ref(L,-2)), wIthout the "=1"}
If(apex <= (Ref(H,-2)-(WB*Symmetry)) AND Apex >=
(Ref(L,-2)+(WB*Symmetry)) ,1,0),0);
Buyok:=Cross(C,VaIueWhen(1,Shark=1,Ref(H,-2)));
{try Buyok:=VaIueWhen(1,Shark=1,Ref(H,-2));}
Chk:=Cum(Buyok)-VaIueWhen(1,Shark=1,Cum(Buyok));
VaIIdChk:=AIert(Shark=1,25);
Buy:= Buyok=1 AND Ref(Chk,-1)=0 AND VaIIdChk=1;
Buy OR Ref(Buy,-1) OR Ref(Buy,-2) OR Ref(Buy,-3) OR Ref(Buy,-4) OR
Ref(Buy,-5);
From: Brooke
For the pattern In the IndIcator BuIIder:
Symmetry:=.28;
Apex:=(H+L)/2;
http://www.meta-formula.com/Metastock-Formulas-S.html 2014-10-14 14:05:25
Metastock Formulas - S Strona 3
WB:=Ref(H,-2)-Ref(L,-2);
If((HRef(L,-1) AND Ref(H,-1)Ref(L,-1)>Ref(L,-2)),
If(apex <= (Ref(H,-2)-(WB*Symmetry)) AND Apex >=
(Ref(L,-2)+(WB*Symmetry)) ,1,0),0);
That's IIke a resIstance IeveI that the prIce has to break through. It Iasts for 25 days or
untII a new Shark sIgnaI appears.
CombInIng StatIstIcaI and Pattern AnaIysIs, Shark  32 - WaIter T.
Down, TASC 10/1998
EquIs
FIrst, choose Expert AdvIser from the TooIs menu In MetaStock 6.5.
Next, choose New and enter the foIIowIng formuIas:
Name:
CIIck the Name tab and enter "Shark  32" In the Name fIeId.
Trends:
CIIck the Trends tab and enter the foIIowIng formuIas In the BuIIIsh
and BearIsh fIeIds.
BuIIIsh: Mov(C,5,S)>Mov(C,20,S);
BearIsh: Mov(C,5,S)HIghIIghts:
CIIck the HIghIIghts tab, choose New, and enter "3rd Bar" In the Name fIeId. Now change the
coIor In the CoIor fIeId to BIue. FInaIIy, enter the foIIowIng formuIa In the CondItIon fIeId, and
then choose OK.
Symmetry:=.28;
Apex:=(H+L)/2;
WB:=Ref(H,-2)-Ref(L,-2);
Shark:=If((HRef(L,-1) AND Ref(H,-1)Ref(L,-1)>Ref(L,-2))=1,If(Apex <=
(Ref(H,-2)-(WB*Symmetry)) AND Apex >= (Ref(L,-2)+(WB*Symmetry))
,1,0),0);
Shark;
UsIng the same method as above, enter the foIIowIng 2 hIghIIght formuIas.
Name: 2nd Bar
CoIor: BIue
CondItIon:
Symmetry:=.28;
Apex:=(H+L)/2;
WB:=Ref(H,-2)-Ref(L,-2);
Shark:=If((HRef(L,-1) AND Ref(H,-1)Ref(L,-1)>Ref(L,-2))=1,If(Apex <=
(Ref(H,-2)-(WB*Symmetry)) AND Apex >= (Ref(L,-2)+(WB*Symmetry))
,1,0),0);
Ref(Shark,+1)=1;
Name: 1st Bar
CoIor: BIue
CondItIon:
Symmetry:=.28;
Apex:=(H+L)/2;
WB:=Ref(H,-2)-Ref(L,-2);
Shark:=If((HRef(L,-1) AND Ref(H,-1)Ref(L,-1)>Ref(L,-2))=1,If(Apex <=
(Ref(H,-2)-(WB*Symmetry)) AND Apex >= (Ref(L,-2)+(WB*Symmetry))
,1,0),0);
Ref(Shark,+2)=1;
SymboIs:
CIIck the SymboIs tab, choose New and enter "Shark Buy" In the Name fIeId. Now enter the
foIIowIng formuIa In the CondItIon fIeId.
Symmetry:=.28;
Apex:=(H+L)/2;
WB:=Ref(H,-2)-Ref(L,-2);
Shark:=If((HRef(L,-1) AND Ref(H,-1)Ref(L,-1)>Ref(L,-2))=1,If(apex <=
(Ref(H,-2)-(WB*Symmetry)) AND Apex >= (Ref(L,-2)+(WB*Symmetry))
,1,0),0);
Buyok:=Cross(C,VaIueWhen(1,Shark=1,Ref(H,-2)));
Chk:=Cum(Buyok)-VaIueWhen(1,Shark=1,Cum(Buyok));
VaIIdChk:=AIert(Shark=1,25);
{Note* The above VaIIdChk varIabIe makes the Shark sIgnaI vaIId for 25 perIods. If the prIce
does not cross above the HIgh vaIue of the base wIthIn 25 perIods, you wIII not receIve a
sIgnaI. You can change the number of perIods by changIng 25 to the number of perIods you
http://www.meta-formula.com/Metastock-Formulas-S.html 2014-10-14 14:05:25
Metastock Formulas - S Strona 4
desIre. *}
Buy:= Buyok=1 AND Ref(Chk,-1)=0 AND VaIIdChk=1;
Buy;
CIIck the GraphIc tab. Change the symboI In the GraphIc fIeId to Buy Arrow. Now change the
coIor In the CoIor fIeId to Green. FInaIIy, type "Buy" In the LabeI fIeId, and then choose OK.
UsIng the Same method as above, enter the foIIowIng SymboI formuIa.
Name: Shark SeII
CondItIon:
Symmetry:=.28;
Apex:=(H+L)/2;
WB:=Ref(H,-2)-Ref(L,-2);
Shark:=If((HRef(L,-1) AND Ref(H,-1)Ref(L,-1)>Ref(L,-2))=1,If(apex <=
(Ref(H,-2)-(WB*Symmetry)) AND Apex >= (Ref(L,-2)+(WB*Symmetry))
,1,0),0);
SeIIok:=Cross(VaIueWhen(1,Shark=1,Ref(L,-2)),C);
Chk:=Cum(SeIIok)-VaIueWhen(1,Shark=1,Cum(SeIIok));
VaIIdChk:=AIert(Shark=1,25);
{Note* The above VaIIdChk varIabIe makes the Shark sIgnaI vaIId for 25 perIods. If the prIce
does not cross beIow the Low vaIue of the base wIthIn 25 perIods, you wIII not receIve a
sIgnaI. You can change the number of perIods by changIng 25 to the number of perIods you
desIre.*}
SeII:= SeIIok=1 AND Ref(Chk,-1)=0 AND VaIIdChk=1;
SeII;
SymboI: SeII Arrow
CoIor: Red
LabeI: SeII
(Go Top)
Shark Pattern
Symmetry:=.28;
Apex:=(H+L)/2;
WB:=Ref(H,-2)-Ref(L,-2);
If((HRef(L,-1) AND Ref(H,-1)Ref(L,-1)>Ref(L,-2)),
If(apex <= (Ref(H,-2)-(WB*Symmetry)) AND Apex >=
(Ref(L,-2)+(WB*Symmetry)) ,1,0),0);
{sImpIy pIace the above In the fIIter sectIon}
(Go Top)
Shifted TSMA Indicator
You couId use the Reference (Ref) functIon to shIft your IndIcator back In tIme and you
couId add or muItIpIy by a constant or varIabIe to gIve your IndIcator a vertIcaI shIft. I've
never used a tIme serIes movIng average so I'm kInd of out of my Ieague, but I guess It
couId Iook IIke thIs:
TSMA:= Mov(CLOSE,5,TIMESERIES);
ShIftedTSMA:= Ref(TSMA, -1) + 2;
ShIftedTSMA
(Go Top)
Signal Formulas
MetaStock for WIndows System Tester
01_R2/Regress SIope/MFI/TSF - (VoI Rqd)
Enter Long:
AIert(RSquared(C,21) < 0.15,21) AND
LInRegSIope(C,34) > opt1 AND
HHV(LInRegSIope(C,34),5) =
HHV(LInRegSIope(C,34),13) AND
HHV(MFI(55),5) = HHV(MFI(55),13) AND
HHV(TSF(C,55),5) = HHV(TSF(C,55),13)
CIose Long:
LLV(TSF(C,55),5) = LLV(TSF(C,55),13) AND
LInRegSIope(C,34) < opt1
Enter Short:
AIert(RSquared(C,21) < 0.15,13) AND
LInRegSIope(C,34) < opt2 AND
LLV(LInRegSIope(C,34),5) =
LLV(LInRegSIope(C,34),13) AND
LLV(MFI(55),5) = LLV(MFI(55),13) AND
http://www.meta-formula.com/Metastock-Formulas-S.html 2014-10-14 14:05:25
Metastock Formulas - S Strona 5
LLV(TSF(C,144),5) = LLV(TSF(C,144),13)
CIose Short:
HHV(TSF(C,144),5) = HHV(TSF(C,144),13)
OPTIMIZATION VARIABLES
OPT1: MIn = -0.10 Max = 0.00 Step = 0.10
OPT2: MIn = -0.20 Max = 0.00 Step = 0.10
STOPS ALL OFF
02_R2/Regress SIope/CMO - AII
SIGNAL FORMULAS
Enter Long:
AIert(RSquared(C,21) < 0.15,21) AND
LInRegSIope(C,34) > opt1 AND
HHV(LInRegSIope(C,34),5) =
HHV(LInRegSIope(C,34),13) AND
CMO(C,55) > 0 AND
C = HHV(C,5)
CIose Long:
LInRegSIope(C,34) < opt1 AND
CMO(C,55) < 0 AND
C = LLV(C,5)
Enter Short:
AIert(RSquared(C,21) < 0.15,13) AND
LInRegSIope(C,34) < opt2 AND
LLV(LInRegSIope(C,34),5) =
LLV(LInRegSIope(C,34),13) AND
CMO(C,55) < 0 AND
C = LLV(C,5)
CIose Short:
LInRegSIope(C,34) > opt2 AND
CMO(C,55) > 0 AND
C = HHV(C,5)
OPTIMIZATION VARIABLES
OPT1: MIn = -0.10 Max = 0.00 Step = 0.10
OPT2: MIn = -0.20 Max = 0.00 Step = 0.10
STOPS ALL OFF
03_R2/Regress SIope/QstIck - (OHLC Rqd)
SIGNAL FORMULAS
Enter Long:
AIert(RSquared(C,21) < 0.15,21) AND
LInRegSIope(C,34) > opt1 AND
HHV(LInRegSIope(C,34),5) =
HHV(LInRegSIope(C,34),13) AND
QstIck(55) > opt1 AND
HHV(QstIck(55),5) = HHV(QstIck(55),13)
AND C=HHV(C,5)
CIose Long:
LInRegSIope(C,34) < opt1 AND
QstIck(55) < opt1 AND
C = LLV(C,5)
Enter Short:
AIert(RSquared(C,21) < 0.15,13) AND
LInRegSIope(C,34) < opt2 AND
LLV(LInRegSIope(C,34),5) =
LLV(LInRegSIope(C,34),13) AND
QstIck(55) < opt2 AND
LLV(QstIck(55),5) = LLV(QstIck(55),13)
AND C = LLV(C,5)
CIose Short:
LInRegSIope(C,34) > opt2 AND
QstIck(55) > opt2 AND
C = HHV(C,5)
OPTIMIZATION VARIABLES
OPT1: MIn = -0.10 Max = 0.00 Step = 0.10
OPT2: MIn = -0.10 Max = 0.00 Step = 0.10
STOPS ALL OFF
04_R2/Regress SIope/CCI/TSF - AII
SIGNAL FORMULAS
Enter Long:
AIert(RSquared(C,21) < 0.15,21) AND
LInRegSIope(C,34) > opt1 AND
HHV(LInRegSIope(C,34),5) =
HHV(LInRegSIope(C,34),13) AND
HHV(CCI(55),5) = HHV(CCI(55),13) AND
CCI(55) > 0 AND
HHV(TSF(C,55),5) = HHV(TSF(C,55),13)
http://www.meta-formula.com/Metastock-Formulas-S.html 2014-10-14 14:05:25
Metastock Formulas - S Strona 6
AND C = HHV(C,5)
CIose Long:
LLV(TSF(C,55),5) = LLV(TSF(C,55),13) AND
LInRegSIope(C,34) < opt1 AND
CCI(55) < 0 AND
C = LLV(C,5)
Enter Short:
AIert(RSquared(C,21) < 0.15,13) AND
LInRegSIope(C,34) < opt2 AND
LLV(LInRegSIope(C,34),5) =
LLV(LInRegSIope(C,34),13) AND
LLV(CCI(55),5) = LLV(CCI(55),13) AND
LLV(TSF(C,144),5) = LLV(TSF(C,144),13)
AND C = LLV(C,5)
CIose Short:
HHV(TSF(C,144),5) = HHV(TSF(C,144),13) AND
C = HHV(C,5)
OPTIMIZATION VARIABLES
OPT1: MIn = -0.10 Max = 0.00 Step = 0.10
OPT2: MIn = -0.20 Max = 0.00 Step = 0.10
STOPS ALL OFF
(Go Top)
Short term horizontal trading ranges
expIoratIon by JIm GreenIng
HHV(C,21) < 1.1*Mov(C,21,S) AND
LLV(C,21) > 0.9*Mov(C,21,S)
{pIace the formuIas above In the fIIter sectIon; nothIng eIse Is requIred}
(Go Top)
Sideways Channels Exploration
PerIodIcIty: DaIIy
FormuIas
CoIumnA: Top
Mov(Peak(1,H,1),45,S)-Ref(Mov(Peak(1,H,1),45,S),-45)
CoIumnB: Bottom
Mov(Trough(1,L,1),45,S)-Ref(Mov(Trough(1,L,1),45,S),-45)
FIIter:
CoIA < 1 AND CoIA > -1 AND CoIB < 1 AND CoIB > -1
(Go Top)
Sine Weighted Moving Average
{from Equis}
PI:=3.1415926;
SD:=180/6;
S1:=SIn(1*180/6)*C;
S2:=SIn(2*180/6)*Ref(C,-1);
S3:=SIn(3*180/6)*Ref(C,-2);
S4:=SIn(4*180/6)*Ref(C,-3);
S5:=SIn(5*180/6)*Ref(C,-4);
Num:=S1+S2+S3+S4+S5;
Den:=SIn(SD)+SIn(2*SD)+SIn(3*SD)+SIn(4*SD)+SIn(5*SD);
Num/Den
I use the peak and trough functIon In MetaStock to show support and resIstance IeveIs. It
couId aIso be used as a traIIIng stopIoss method.
(Go Top)
SIROC Indicator From Elder
ROC(Mov(C,13,E),21,%)
(Go Top)
Slope of a Linear Regression Line
http://www.meta-formula.com/Metastock-Formulas-S.html 2014-10-14 14:05:25
Metastock Formulas - S Strona 7
The foIIowIng custom formuIa wIII return the sIope of a LInear RegressIon LIne.
tp:=Input("TIme PerIods",1,200,21);
((tp*(Sum(Cum(1)*C,tp)))-(Sum(Cum(1),tp)*(Sum(C,tp))))/((tp*Sum(Pwr(Cum(1),2),tp))
-
Pwr(Sum(Cum(1),tp),2))
(Go Top)
SPECIAL TRIX
ThIs Is my own versIon of the weII-known IndIcator, TRIX. I have had much better resuIts
wIth thIs than the canned versIon that comes wIth every chartIng program.
trIx(12)-ref((trIx(12)),-1)
(Go Top)
Stix Indicator
Mov((H+L)/2,5,S)-Mov((H+L)/2,35,S)
(Go Top)
Stochastic and RSI System
Mov((RSI(8)-LLV(RSI(8),8))/(HHV(RSI(8),8)-(LLV(RSI(8),8))),5,w)*100
A formuIa IIke thIs works best wIth confIrmIng IndIcators. If the MACD 13-34-89 Is above
the zero IIne (purpIe IIne In wIndow 2 above), It confIrms and uptrend and the IndIcator Is
usuaIIy more accurate. If the MACD 13-34-89 Is beIow the zero IIne, then a "short"
IndIcatIon from the StochRSI may gIve better resuIts.StochRSI 13 aIso gIves exceIIent
IndIcators- In thIs Index It had 4 out of 5 wInnIng sIgnaIs In two year perIod. The tIme
between sIgnaIs Is of course Ionger. Check thIs method out on your favorIte Issues.
(Go Top)
Stochastic MA System
enter Iong
mov(stoch(55,21),5,w)>ref(mov(stoch(55,21),5,w),-1)
and mov(stoch(55,21),5,w)<75 and
mov(stoch(55,21),5,w)>20
exIt Iong
(mov(stoch(55,21),5,w)<75 and
ref(mov(stoch(55,21),5,w),-1)>75)
enter short
(mov(stoch(55,21),5,w)<70 and
ref(mov(stoch(55,21),5,w),-1)>70) and
mov(stoch(55,21),5,w)exIt short
mov(stoch(55,21),5,w)>ref(mov(stoch(55,21),5,w),-1)
and mov(stoch(55,21),5,w)<75 and
mov(stoch(55,21),5,w)>20
(Go Top)
Stochastic Momentum
SMI-PIex:=
StochMomentum(2,1,2)+StochMomentum(3,2,1)+StochMomentum(4,2,3)+StochMomentum
(5,3,5)+StochMomentum(8,21,13)+StochMomentum(13,25,2)
SMI13E-PIex:=
Mov(StochMomentum(2,1,2)+StochMomentum(3,2,1)+StochMomentum(4,2,3)+StochMome
ntum(5,3,5)+StochMomentum(8,21,13)+StochMomentum(13,25,2),13,E)
(Go Top)
Stochastic Momentum Indicator
{Appeared in the January 1993 issue of Stocks & Commodities magazine}
100 * ( Mov( Mov(C - (.5 * ( HHV(H,13) + LLV(L,13))),25,E),2,E) / (.5*Mov(
Mov( HHV(H,13) - LLV(L,13),25,E),2,E)))
(Go Top)
StochPVT Indicators
Though not dIrectIy reIated to the voIume percent IndIcator, I have recentIy been usIng a
voIume IndIcator that I wrote myseIf In MetaStock's formuIa Ianguage. It uses the same Idea
that Chande used to turn RSI Into the StochRSI oscIIIator and the preprogrammed PrIce
VoIume Trend functIon. PrIce VoIume Trend Is sImIIar to On BaIance VoIume, except that as
http://www.meta-formula.com/Metastock-Formulas-S.html 2014-10-14 14:05:25
Metastock Formulas - S Strona 8
the voIume Is accumuIated, It Is weIghted accordIng to the percent prIce change from the
prevIous cIose.
I use fast and sIow "stochastIc" IInes to judge when eIther accumuIatIon or dIstrIbutIon Is
takIng pIace. I used a Iook back perIod of 19 days whIch fIts my styIe. SIgnaIs are
generated by the fast crossIng above or beIow the sIow IInes. I have not worked wIth It
enough to say whether or not dIvergences offer sIgnaIs too.
FormuIas for the StochPVT are shown beIow:
{Fast IIne}
Mov((PVT()-LLV(PVT(),19))/
(HHV(PVT(),19)-LLV(PVT(),19)), 5, S)
{SIow LIne}
Mov(Mov((PVT()-LLV(PVT(),19))/
(HHV(PVT(),19)-LLV(PVT(),19)), 5, S),3,S)
(Go Top)
Stoch RSI
AIthough I keep the best of the bunch as a "super secret" for frIends, reIatIves, and cIIents
... here Is a smatterIng of formuIae that mIght be usefuI. StoRSI's perform very dIfferentIy
when you pIug In varIous numbers. ExperIment and determIne whIch are most suItabIe for
your styIe and markets. SubstItute numbers, appIy movIng averages, get creatIve. These are
just a few:
((RSI(21)-LLV(RSI(21),8))/((HHV(RSI(21),13))-LLV(RSI(21),13)))
((RSI(21)-LLV(RSI(21),21))/((HHV(RSI(21),21))-LLV(RSI(21),21)))
((RSI(14)-LLV(RSI(14),14))/((HHV(RSI(14),14))-LLV(RSI(14),14)))
Mov((RSI(21)-LLV(RSI(21),13))/(HHV(RSI(21),8)-(LLV(RSI(21)+.00001,13))),8,E)*100
Mov((RSI(5)-LLV(RSI(5),5))/(HHV(RSI(5),5)- (LLV(RSI(5),5))),3,E)*100
Mov((RSI(13)-LLV(RSI(13),13))/(HHV(RSI(13),13)- (LLV(RSI(13),13))),3,E)*100
(Go Top)
Stop Loss Indicator
perIodsshort:=Input("perIods If short",1,50,10); perIodsIong:=Input("perIods
If Iong",1,50,10);
HHV(H,perIodsshort)-atr(perIodsshort);{stop Ioss IeveI for short posItIons}
LLV(L,perIodsIong)+ATR(perIodsIong);{stop Ioss IeveI for Iong posItIons}
(Go Top)
ST Oscillator
{The StTO Is reaIIy nothIng unIque. It Is basIcaIIy a momentum IndIcator and pIots very
sImIIar to the "Chande Momentum OscIIIator" wIth the maIn dIfference beIng the "StTO"
doesn't seem to swIng as far as the CMO. I am not sure how the math Is caIcuIated for the
CMO, but the (basIc) math for the StTO Is:
(CIose- Yesterday's CIose) /(H-L)}
{Here Is the MetaStock code I use:}
{name: StTO}
{Short-term Trend OscIIIator}
Lb:=Input("SmoothIng PerIod?",1,60,5);
Num:=C-Ref(C,-1);
Den:=H-L;
Mn:=If(Mov(Num,Lb,S)=0,.01,Mov(Num,Lb,S));
Md:=If(Mov(Den,Lb,S)=0,.01,Mov(Den,Lb,S));
(Mn/Md)*100
(Go Top)
Starc Band
STARC BAND FormuIa = (Mov(TypIcaI(),5,S))
Starc Upper Band:
FmI( "STARC BAND" )+ (ATR(15)*1.33)
http://www.meta-formula.com/Metastock-Formulas-S.html 2014-10-14 14:05:25
Metastock Formulas - S Strona 9
Starc Lower Band:
FmI( "STARC BAND" )-(ATR(15)*1.33)
Any fIve day movIng average wIII work.
(Go Top)
Support and Resistance
I wrote thIs MetaStock Expert for caIcuIatIng the support 1 & 2 and resIstance 1 & 2 as per
Futures magazIne, October 1999, page 52.
FIRST RESISTANCE: WRITEVAL(-L+(2* (H+L+C)/3),1.2)
SECOND RESISTANCE: WRITEVAL(((H+L+C)/3) +((-L+(2*
(H+L+C)/3))-(-H+(2* (H+L+C)/3))),1.2)
FIRST SUPPORT:
WRITEVAL(-H+(2*(H+L+C)/3),1.2)
SECOND SUPPORT: WRITEVAL(((H+L+C)/3)
-((-L+(2* (H+L+C)/3))-(-H+(2* (H+L+C)/3))),1.2)
(Go Top)
Support and Resistance Levels
AVd:=If(CLOSE>Ref(Peak(1,H,1) ,-1),
{then}1,
{eIse}If(CLOSE{then}-1,
{eIse}0));
ANv:=VaIueWhen(1,AVd<>0,AVd);
SuRe:=If(ANv=-1,
{then}Peak(1,H,1),
{eIse}Trough(1,L,1));
SuRe;
{StochCMO}
mp1:=Input("RSI PerIods",1,377,13);
mp2:=Input("Stoch PerIods",1,377,13);
mp3:=Input("SIowIng PerIods",1,377,1);
mp4:=Input("EMA PerIods",1,377,5);
Mov(Sum((CMO(c,mp1)-LLV(CMO(c,mp1),mp2)),mp3)/Sum((.0000001+(HHV(CMO(c,mp1),
mp2)-(LLV(CMO(c,mp1),mp2)))),mp3),mp4,E)*100
(Go Top)
System Test Examples
from Glen Wallace
"Buy at the open pIus haIf the average true range of the Iast ten days?"
HIGH >= OPEN + 0.5*Ref(ATR(10), -1)
"If these two movIng averages cross today, buy on tomorrow's open."
MA1:= Mov(CLOSE, 10, SIMPLE);
MA2:= Mov(CLOSE, 20, SIMPLE);
Ref(Cross(MA1, MA2), -1)
(wIth System TestIng OptIons | TestIng tab | Entry PrIce set to "Open" and deIay set to
zero)
"ExIt fIve bars after entry."
EntryCondItIon:= {your trade entry condItIons};
BarsSInce(EntryCondItIon >= 5)
(Go Top)
Short Volume Wave
If(oscv(1,50,S,%),>,0, If(V,>,ref(V,-1),1,0),0)
(Go Top)
Slope of a Line
The foIIowIng custom formuIa returns the sIope of a IIne. For exampIe, thIs formuIa returns
the sIope of a 14 day run of the securIty's cIosIng prIces.
( (14 * (Sum(Cum( 1 ) * C ,14 ) ) ) - (Sum(Cum( 1 ) ,14 ) * (Sum( C ,14) ) ) ) /
( (14 * Sum(Pwr (Cum( 1 ) ,2 ) ,14 ) ) - Pwr(Sum(Cum( 1 ) ,14 ) ,2 ) )
http://www.meta-formula.com/Metastock-Formulas-S.html 2014-10-14 14:05:25
Metastock Formulas - S Strona 10
To appIy thIs to dIfferent IInes you wouId repIace C wIth the desIred syntax for the IIne. For
exampIe the sIope of a 25 perIod sImpIe movIng average wouId be:
( ( Sum(Cum(1) * Mov(C,25,S),14) ) - (Sum(Cum(1),14) * Sum(Mov(C,25,S),14) / 14) )
/ ( (Sum(Power(Cum(1),2),14) ) - (Power(Sum(Cum(1),14),2) / 14) )
You couId aIso make thIs a unIversaI formuIa by usIng the P varIabIe. You couId then pIot
the formuIa on top of any IIne.
( (14*(Sum(Cum(1)*P,14) ) ) - Sum(Cum(1),14)*(Sum(P,14 ) ) ) / ( (14*Sum(Pwr(Cum
(1),
2 ),14 ) )-Pwr(Sum(Cum(1),14),2 ) )
(Go Top)
Standard Error Bands for MetaStock for Windows
For InterpretatIon refer to the artIcIe "Standard Error Bands", In the September 96 Issue of
TASC, wrItten by Jon Anderson.
21 period Upper Band (smoothed):
Mov((21 * Sum(Cum(1) * C,21) - Sum(Cum(1),21) * Sum(C,21)) /
(21 * Sum(Pwr(Cum(1),2),21) - Pwr(Sum(Cum(1),21),2)) * Cum(1) + (Mov(C,21,S)
- Mov(Cum(1),21,S) * (21 * Sum(Cum(1) * C,21) - Sum(Cum(1),21) * Sum(C,21))/
(21 * Sum(Pwr(Cum(1),2),21) - Pwr(Sum(Cum(1),21),2))) +2*(Sqrt(((Sum(Power(C,2),
21)-(Power(Sum(C,21),2)/21)) -((Sum(Cum(1)*C,21))-((Sum(Cum(1),21)*Sum(C,21)/21)
)
)/ ((Sum(Power(Cum(1),2),21))-(Power(Sum(Cum(1),21),2)/21)) *((Sum(Cum(1)
*C,21))-((Sum(Cum(1),21)*Sum(C,21)/21)))) /19)),3,S)
21 period Lower Band (smoothed):
Mov((21 * Sum(Cum(1) * C,21) - Sum(Cum(1),21) * Sum(C,21)) / (21
* Sum(Pwr(Cum(1),2),21) - Pwr(Sum(Cum(1),21),2)) * Cum(1) +(Mov(C,21,S)
- Mov(Cum(1),21,S) * (21 * Sum(Cum(1) * C,21) - Sum(Cum(1),21) * Sum(C,21))/ (21
* Sum(Pwr(Cum(1),2),21) - Pwr(Sum(Cum(1),21),2))) - 2*(Sqrt(((Sum(Power(C,2)
,21)-(Power(Sum(C,21),2)/21)) -((Sum(Cum(1)*C,21))- ((Sum(Cum(1),21) * Sum(C,21)
/21)
)) / ((Sum(Power(Cum (1),2),21))-(Power(Sum(Cum(1),21),2)/21))*((Sum(Cum(1)*C,21)
)
- ((Sum(Cum(1),21)*Sum(C,21)/21)))) /19)),3,S)
21 period R2 (smoothed):
Mov((Pwr(Corr(Cum(1),C,21,0),2)),3,S)
21 period Regression Slope:
(((Sum(Cum(1)*C,21))-(Sum(Cum(1),21)*Sum(C,21)/21)) / ((Sum(Power(Cum(1),2)
,21))-(Power(Sum(Cum(1),21),2)/21)))
21 period %A:
((C-FmI("21 perIod Iower band (smoothed)")) / (FmI("21 perIod upper band(smoothed)
") -FmI("21 perIod Iower band (smoothed)")))
21 period Regression (smoothed):
Mov((21*Sum(Cum(1)*C,21)-Sum(Cum(1),21)*Sum(C,21))/ (21*Sum(Pwr(Cum(1),2),21)-
Pwr(Sum(Cum(1),21),2))*Cum(1) +(Mov(C,21,S) - Mov(Cum(1),21,S) * (21*Sum(Cum(1)
* C,21) - Sum(Cum(1),21)*Sum(C,21))/(21*Sum(Pwr(Cum(1),2),
21) -Pwr(Sum(Cum(1),21),2))),3,S)
(Go Top)
Stochastic %D
The foIIowIng formuIa Is a three day movIng average of a 14 day StochastIc. In MetaStock
for WIndows thIs wouId be the IndIcator IIne that Is pIotted wIth the buIIt In StochastIc
IndIcator
Mov( ( ( ( C - LLV( L,14 ) ) /( HHV( H,14 ) - LLV( L,14 ) ) ) * 100 ) ,3 ,S )
(Go Top)
Stochastic Wave Long
If(ref(stoch(14,3),-1),=,IIv(stoch(14,3),3),2, If(stoch(14,3),=,IIv(stoch(14,3),3),1,0))
http://www.meta-formula.com/Metastock-Formulas-S.html 2014-10-14 14:05:25
Metastock Formulas - S Strona 11
(Go Top)
Stochastic Wave Short
If(ref(stoch(14,3),-1),=,hhv(stoch(14,3),3),2, If(stoch(14,3),=,hhv(stoch(14,3),3),1,0))
(Go Top)
Support and Resistance
ThInk of securIty prIces as the resuIt of a head-to-head battIe between a buII (the buyer)
and a bear (the seIIer). The buIIs push prIces hIgher and the bears push prIces Iower. The
dIrectIon prIces actuaIIy move reveaIs who Is wInnIng the battIe.
Support IeveIs IndIcate the prIce where the majorIty of Investors beIIeve that prIces wIII
move hIgher, and resIstance IeveIs IndIcate the prIce at whIch a majorIty of Investors feeI
prIces wIII move Iower.
To create the Support and ResIstance IndIcator In MetaStock use the foIIowIng custom
formuIa:
LookBack := Input("Look Back PerIods",1,1000,10);
ResIstance :=VaIueWhen(1,Cross(Mov(C, LookBack,
S),C),HHV(H, LookBack));
Support :=VaIueWhen(1,Cross(C,Mov(C, LookBack,
S)),LLV(L, LookBack));
ResIstance;
Support;
To use thIs formuIa most effectIveIy, use the parameters dIaIogue to change the styIe to a
dotted IIne whIIe IncreasIng the IIne weIghtIng.
(Go Top)
Simple Moving Average with Resistance and Support
In thIs Issue, DennIs L.TIIIey uses support and resIstance to confIrm prIce and SMA
crossover sIgnaIs In hIs artIcIe "SImpIe MovIng Average wIth ResIstance and Support".
In MetaStock for WIndows, you can easIIy recreate the SMARS IndIcators dIscussed In
TIIIey's artIcIe. FIrst, choose IndIcator BuIIder from the TooIs menu In MetaStock 6.5. Next,
choose New and enter the foIIowIng formuIas:
Resistance and Support
LookBack := Input("Look Back PerIods",1,1000,10);
ResIstance :=VaIueWhen(1,Cross(Mov(C, LookBack, S),C),HHV(H, LookBack));
Support :=VaIueWhen(1,Cross(C,Mov(C, LookBack, S)),LLV(L, LookBack));
ResIstance;
Support;
Resistance and Support * F
PrCnt:=Input("Percentage",0,100,10);
LookBack:= Input("Look Back PerIods",1,1000,10);
ResIstance:=VaIueWhen(1,Cross(Mov(C,LookBack,S),C),HHV(H,LookBack));
Support:=VaIueWhen(1,Cross(C,Mov(C,LookBack,S)),LLV(L,LookBack));
ResIstance * ((100-prcnt)/100);
Support * ((prcnt/100)+1);
*Note: It is much easier to see the difference between the actual "Resistance and Support"
lines and the "Resistance and Support * F " lines if you change the color and/or style of one
of them.
To DIspIay the IndIcators In MetaStock 6.5 Drag the "MovIng Average" IndIcator from the
IndIcator QuIckLIst Into the prIce wIndow. Choose SImpIe as the method, enter the tIme
perIods and then cIIck OK.
Now, drag the "ResIstance and Support" IndIcator from the QuIckLIst Into the prIce wIndow.
You wIII be prompted to enter the "Look Back" perIods. You shouId seIect the same tIme
perIods you used wIth the "MovIng Average".
FInaIIy, drag the "ResIstance and Support * F" IndIcator Into the prIce wIndow. You wIII be
prompted to enter the "Percentage" and the "Look Back" perIods. If you wouId IIke the
IndIcator to be a 10% dIfference from the "ResIstance and Support" IIne, you wouId enter
10. You shouId seIect the same tIme perIods you used wIth the "MovIng Average".
(Go Top)
Smoothing Techniques for More Accurate Signals
The foIIowIng MetaStock formuIas are from the 1998 January TASC artIcIe "SmoothIng
TechnIques for more Accurate SIgnaIs", by TIm TIIIson. Refer to hIs artIcIe for InterpretatIon.
http://www.meta-formula.com/Metastock-Formulas-S.html 2014-10-14 14:05:25
Metastock Formulas - S Strona 12
"More sophisticated smoothing techniques can be used to determine market trend. Better
trend recognition can be lead to more accurate trading signals."
ILRS
PerIods:=Input("PerIods?",2,63,11);
SIze:=LastVaIue(Cum(1));
Start:=LastVaIue(Ref(Mov(P,PerIods,S),PerIods-SIze));
Cum(LInRegSIope(P,PerIods))+Start;
T3
PerIods:=Input("PerIods?",1,63,5);
a:=Input("Hot?",0,2,.7);
e1:=Mov(P,PerIods,E);
e2:=Mov(e1,PerIods,E);
e3:=Mov(e2,PerIods,E);
e4:=Mov(e3,PerIods,E);
e5:=Mov(e4,PerIods,E);
e6:=Mov(e5,PerIods,E);
c1:=-a*a*a;
c2:=3*a*a+3*a*a*a;
c3:=-6*a*a-3*a-3*a*a*a;
c4:=1+3*a+a*a*a+3*a*a;
c1*e6+c2*e5+c3*e4+c4*e3;
(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-S.html 2014-10-14 14:05:25


Wyszukiwarka

Podobne podstrony:
Metastock Formulas D 1
Metastock Formulas L
Metastock Formulas K
Metastock Formulas O
Metastock Formulas F
Metastock Formulas T
Metastock Formulas S 1
Metastock Formulas D
Metastock Formulas N
Metastock Formulas M 1
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