Metastock Formulas - P Strona 1
Metastock Formulas - P
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
Panic Selling Presto's Magic Box (a tweaked version of the
MetaStock Llnks
Performance Daily Darvis Box)
Performance Intra Day and Daily Price Action Indicator (PAIN)
Rave Revlews
Persistance of Money Flow Price and Volume Breakout
PFE Indicator Pring's Daily KST Buy
About Us
Plotting Forward Days Projected Range
Percent Above/Below Moving Price Oscillator Wave
Average Price Volume Rank
Contact Us
Plotting Alpha and Beta Price Volume Trend Stochastic
Polarized Fractual Efficiency Pathfinder Trading System
SlteMap
Psychology Index Periodicity detector
Panic Selling
sqrt(((buyp()/seIIp())/rsI(2))) > ref(((buyp()/seIIp())/rsI(2)),-1)
(Go Top)
Performance Daily
Stocks sorted on % gaIns over 1, 2, 3, 4, and 5 days. Rank resuIts for the seIected day.
Good for fIndIng breakout stocks.
CLOSE
ROC(CLOSE,1,percent)
ROC(CLOSE,2,percent)
ROC(CLOSE,3,percent)
ROC(CLOSE,4,percent)
ROC(CLOSE,5,percent)
(Go Top)
Performance Intra Day and Daily
CoIA:C {IabeI CLOSE}
CoIB:O {IabeI OPEN}
CoIC:Sub(C,O) / O {IabeI Intr.dy%}
CoID:Sub(C,Ref(C,-1)) / Ref(C,-1) {IabeI 1 dy %}
CoIE:Sub(C,Ref(C,-2)) / Ref(C,-2) {IabeI 2 dy %}
CoIF:Sub(C,Ref(C,-3)) / Ref(C,-3) {IabeI 3 dy %}
FIIter: O>.2 AND
C<.3 AND
C>.2
FIIter: enabIed
PerIodIcIty: DaIIy
Records requIred: 5
(Go Top)
http://www.meta-formula.com/Metastock-Formulas-P.html 2014-10-14 14:05:05
Metastock Formulas - P Strona 2
Persistance of Money Flow
ChaIkIn's Money FIow Is a buIIt-In MetaStock IndIcator, as foIIows: cmf(perIods)
PersIstence of Money FIow (PMF%)
Pds1:= Input("CMF PerIods?",1,100,21);
Pds2:= Input("PMF PerIods?",10,1000,120);
Sum((cmf(Pds1)>0),Pds2)/(Pds2/100)
{from HHP}
PersIstence or (PMF%) Is the percentage of days over 6 months that the ChaIkIn Money FIow
OscIIIator Is above 0. The ChaIkIn Money FIow OscIIIator formuIa defauIt uses a 21 day
money fIow sum dIvIded by the 21 day sum of daIIy voIume. HHP sent the correct IndIcator
formuIa for persIstence, tho you can modIfy It by seIectIng 1 for "Pds1" If you prefer to
create a 120 day cumuIatIve money fIow IndIcator to do what you are suggestIng. The
cumuIatIve money fIow IndIcator often uses a 90SMA trIgger.
(Go Top)
PFE Indicator
Mov(If(C > Ref(C,-9), Sqr( Pwr( ROC(C,9,$),2) + Pwr(10,2))
/ Sum( Sqr( Pwr( ROC(C,1,$),2) +1), 9),-Sqr( Pwr(ROC(C,9,$),2) + Pwr( 10,2))
/ Sum(Sqr(Pwr(ROC(C,1,$),2)+1),9)) * 100,5,E)
I use a 80, -80 trendIIne. I have stuck It In dIfferent thIngs at dIfferent tImes. RIght now I
have It crossIng -80 wIth MACD 4, 35,5, crossIng, RSI(9) up one day, and seIIIng pressure
down one day.
(Go Top)
Plotting Forward Days
I want an IndIcator that wIII project an exponentIaI movIng average Into the next perIod
(I.e., draw tomorrow's IIne). It wouId be reaIIy spIffy If I couId pI ug In tomorrow estImated/
projected cIose and be abIe to adjust the IndIcator based on varIous projected cIoses.
The formuIa beIow may be cIose to what you want, but It wIII not pIot on the forward day. It
wIII just pIot the poInt where tomorrow's EMA wouId be. The equatIon Is based on the
MetaStock manuaI, page 459, concernIng exponentIaI movIng averages.
TC:=Input("Tomorrow's cIose",0.001,1000,1);
MAP:=Input("MovIng Average PerIod",2,144,55);
MA1:=Mov(C,MAP,E);
EPX:=2/(MAP+1);
MA2:=(TC*EPX)+(MA1*(1-EPX));
VaIueWhen(1,Cum(1)=LastVaIue(Cum(1)),MA2)
(Go Top)
Presto's Magic Box
(a tweaked version of the Darvis Box)
PerIods:=Input("perIods",1,260,100);
Topbox:=If(Ref(H,-3)>=Ref(HHV(H,PerIods),-4) AND Ref(H,-2)
[Botbox:=If(Ref(H,-3)>=Ref(HHV(H,PerIods),-4) AND Ref(H,-2)][Botbox;]
Topbox;
(Go Top)
Price Action Indicator (PAIN)
If you were onIy gIven today's open, hIgh, Iow and cIose, how couId you make heads or taIIs
of It? The PrIce ActIon IndIcator (PAIN) can heIp. The formuIa returns a sIngIe vaIue that
weIghs Intra-day momentum (C-O), Late SeIIIng Pressure (LSP) (C-L), and Late BuyIng
Pressure (LBP) (C-H). The formuIa Is proven by constructIng IdeaI IImIt-up and IImIt down
scenarIos In bond futures. The output Is shown to be consIstent wIth the InterpretatIon of
Japanese candIestIck patterns. See MIchaeI B. Geraty (1997). "GettIng Better DIrectIons"
Futures VoI. 26: Aug.
PAIN
http://www.meta-formula.com/Metastock-Formulas-P.html 2014-10-14 14:05:05
Metastock Formulas - P Strona 3
((C-O)+(C-H)+(C-L))/2
(Go Top)
Price and Volume Breakout
Shows stocks where the prIce Increased 5% and the voIume Is 50% above a 50-day movIng
average. Rank resuIts by % change In prIce, then check the voIume.
CLOSE
Ref(CLOSE,-1)
ROC(CLOSE,1,percent)
VOLUME
Mov(VOLUME,50,EXPONENTIAL)
((VOLUME - Mov(VOLUME,50,EXPONENTIAL)) /Mov
(VOLUME,50,EXPONENTIAL)) * 100
**When(coIC >= 5) AND When(coID >= coIE*1.5)
(Go Top)
Pring's Daily KST Buy
Notes: KST BUY SIGNAL FROM BELOW ZERO
CoIA:
Name: CIose
CLOSE
CoIB:
Name: KST
(Mov(ROC(C,10,%),10,S)*1)+(Mov(ROC(C,15,%),10,S)*2)+
(Mov(ROC(C,20,%),10,S)*3)+(Mov(ROC(C,30,%),15,S)*4)
CoIC:
Name: KST MA
Mov((Mov(ROC(C,10,%),10,S)*1)+(Mov(ROC(C,15,%),10,S)*2)+
(Mov(ROC(C,20,%),10,S)*3)+(Mov(ROC(C,30,%),15,S)*4),10,S)
CoID:
Name: KST-1
Ref( (Mov(ROC(C,10,%),10,S)*1)+(Mov(ROC(C,15,%),10,S)*2)+
(Mov(ROC(C,20,%),10,S)*3)+(Mov(ROC(C,30,%),15,S)*4),-1)
CoIE:
Name: MA KST-1
Ref(Mov((Mov(ROC(C,10,%),10,S)*1)+(Mov(ROC(C,15,%),10,S)*2)+
(Mov(ROC(C,20,%),10,S)*3)+(Mov(ROC(C,30,%),15,S)*4),10,S),-1)
FIIter:
When(coIB,>,coIC)AND When(coIB,<,0)AND When( coID,<,coIE)
(Go Top)
Projected Range
From "Lyn Maine"
ThIs Is
Tom DeMark's Projected Range:
TPH1:=(H+C+2*L)/2-L;
TPH2:=(2*H+L+C)/2-L;
TPH3:=(H+L+2*C)/2-L;
TPL1:=(H+C+2*L)/2-H;
TPL2:=(2*H+L+C)/2-H;
TPL3:=(H+L+2*C)/2-H;
PH:=If((CO),TPH2,If((C=O),TPH3,0)));
PL:=If((CO),TPL2,If((C=O),TPL3,0)));
PH;
PL;
ThIs Is my updated versIon of Tushar Chande's VIdya
VIdya:
K:=Stdev(P,5)/Mov(Stdev(P,5),20,S);
SC:=Input("SC",.1,.9,.1);
VIdya:=SC*K*P+(1-SC*K)*Ref(P,-1);
VIdya;
{the sc Input Is more responsIve If you use a hIgher number}
ThIs Is VIdya wIth voIatIIIty bands:
K:=Stdev(C,5)/Mov(Stdev(C,5),20,S);
SC:=0.9;
VIdya:=SC*K*C+(1-SC*K)*Ref(C,-1);
UpperBand:=VIdya+2*.5*K;
LowerBand:=VIdya-2*.5*K;
UpperBand;
LowerBand;
VIdya;
ThIs Is Tushar Chande's target prIce:
http://www.meta-formula.com/Metastock-Formulas-P.html 2014-10-14 14:05:05
Metastock Formulas - P Strona 4
A:=Mov(Abs(C-Ref(C,-1)),10,S);
TPH1:=C+A;
TPH2:=C+(2*A);
TPL1:=C-A;
TPL2:=C-(2*A);
TPH1;
TPH2;
TPL1;
TPL2;
ThIs Is ATR RatIo to CIose:
ATRR:= ATR(5)/C;
MATRR:=Mov(ATRR,3,E);
ATRR;
MATRR;
ThIs Is a CMO ComposIte Average:
(((CMO(C,5))+(CMO(C,10))+(CMO(C,20)))/3)
ThIs Is CMO VoIatIIIty:
S1:= Stdev( CMO(C,5),5);
S2:= Stdev(CMO(C,10),10);
S3:= Stdev(CMO(C,20),20);
CMOV:=(S1*CMO(C,5))+(S2*CMO(C,10))+(S3*CMO(C,20))/(S1+S2+S3);
CMOV;
ThIs Is RuIe of 7 down objectIve:
If((ROC(C,12,%)>-1.5),If((ROC(C,12,%)>-3),
If((ROC(C,12,%)>-4.5),((H-(H-L)*1.75)),((H-(H-L)*2.33))),((H-(H-L)*3.5))),(H-(H-L)))
ThIs Is ruIe of 7 up objectIve:
If((ROC(C,12,%)>1.5),If((ROC(C,12,%)>3),
If((ROC(C,12,%)>4.5),(((H-L)*1.75)+L),(((H-L)*2.33)+L)),(((H-L)*3.5)+L)),((H-L)+L))
ThIs Is ruIe of 7 Osc:
FmI("RuIe of 7 UP ObjectIve") -
FmI("RuIe of 7 DOWN ObjectIve")
ThIs Is %f Osc:
100*((C-Ref(TSF(C,5),-1))/C)
ThIs Is Chande's Trendscore:
If(C>=Ref(C,-11),1,-1)+If(C>=Ref(C,-12),1,-1)+If(C>=Ref(C,-13),1,-1)+
If(C>=Ref(C,-14),1,-1)+If(C>=Ref(C,-15),1,-1)+If(C>=Ref(C,-16),1,-1)+
If(C>=Ref(C,-17),1,-1)+If(C>=Ref(C,-18),1,-1)+If(C>=Ref(C,-19),1,-1)+
If(C>=Ref(C,-20),1,-1)
ThIs Is McGInIey DynamIc:
Ref(Mov(C,12,E),-1)+((C-(Ref(Mov(C,12,E),-1))) / (C/(Ref(Mov(C,12,E),-1))*125))
ThIs Is MorrIs DoubIe Momentum Osc:
Mov(((ROC(C,12.8,%))+(ROC(C,19.2,%))),10,W)
ThIs Is VoIatIIIty%:
Lookback := Input("TIme PerIods",1,1000,50);
HIghVoIatIIIty := Input("HIgh VoIatIIIty %",.01,100,3);
100 * Sum(100 * ATR(1)/CLOSE > HIghVoIatIIIty, Lookback)/Lookback
ThIs Is PosItIve VoIume IndIcator:
Cum(If(V>Ref(V,-1),ROC(C,1,%),0))
ThIs Is negatIve voIume IndIcator:
Cum(If(V[(Go Top)]
Percent Above/Below Moving Average
(oscp(1,30,E,%))
(Go Top)
Plotting Alpha and Beta
To pIot AIpha and Beta In MetaStock foIIow the steps beIow. **The custom IndIcator named
Beta Is requIred to pIot AIpha.
In the Windows versions of MetaStock:
To plot Alpha:
Create the custom formuIas AIpha and Beta (see beIow for formuIa syntax).
http://www.meta-formula.com/Metastock-Formulas-P.html 2014-10-14 14:05:05
Metastock Formulas - P Strona 5
Drag the custom IndIcator AIpha from the QuIck LIst and drop It onto the prIce pIot
of the Index. **The Index pIot wIII turn a purpIIsh coIor when you are pIottIng on top
of It.
**Note, thIs formuIa Is set to caIcuIate AIpha over 21 perIods. To change the tIme perIods
repIace each Instance of 21 In the formuIa wIth the desIred number of perIods and aIso
change the tIme perIods In the Beta custom IndIcator.
( Sum( ROC( CLOSE ,1 ,% ) ,21 ) - ( FmI( "Beta" ) * Sum( ROC( INDICATOR,1,%) ,21 ) )
) / 21
To plot Beta:
Open a chart of the desIred securIty.
Drag the prIce pIot of the Index your comparIng, Into the chart of the securIty.
Drag thIs custom IndIcator from the QuIck LIst and drop It onto the prIce pIot of the
Index.
Note, thIs formuIa Is set to caIcuIate beta over 21 perIods. To change the tIme perIods
repIace each Instance of 21 In the formuIa wIth the desIred number of perIods.
( ( 21 * Sum( ROC( CLOSE ,1 ,% ) * ROC( INDICATOR ,1 ,% ) ,21 ) ) -
( Sum( ROC( CLOSE ,1 ,% ) ,21) * Sum( ROC( INDICATOR ,1 ,% ) ,21 ) ) ) /
( (21 * Sum( Pwr( ROC( INDICATOR ,1 ,% ) ,2 ) ,21 )) - Pwr( Sum( ROC( INDICATOR ,1 ,
% ) ,21 ) ,2 ))
**Beta Is a measure of voIatIIIty of one securIty agaInst another. ThIs Is typIcaIIy used to
measure the voIatIIIty of a stock agaInst an Index IIke the S&P 500. A vaIue greater than
one IndIcates the stock Is more voIatIIe than the Index.
(Go Top)
Polarized Fractual Efficiency
The January 1994 Issue of Stocks & CommodItIes featured an artIcIe by Hans HannuIa on
PoIarIzed FractuaI EffIcIency. Here Is the custom formuIa for creatIng the fIve-perIod
smoothed 10-day PFE usIng MetaStock:
Mov(If(C,>,Ref(C,-9),Sqr(Pwr(Roc(C,9,$),2) + Pwr(10,2)) /
Sum(Sqr(Pwr(Roc(C,1,$),2)+1),9),-
Sqr(Pwr(Roc(C,9,$),2) + Pwr(10,2)) /
Sum(Sqr(Pwr(Roc(C,1,$),2)+1),9))*100,5,E)
(Go Top)
Price Oscillator Wave
If(ref(oscp(3,15,S,%),-1),<,0,1,0)
(Go Top)
Price Volume Rank
Taken from Stocks & CommodItIes, V. 12:6 (235-239): PrIce-VoIume Rank by Anthony J.
Macek
"ImagIne receIvIng a warnIng when the market was IIkeIy to coIIapse or beIng aIerted when
one of your favorIte stocks was about to raIIy. What If these sIgnaIs came from anaIysIs that
was sImpIe enough to do wIthout a computer and took onIy a few mInutes a day to update,
usIng just two pIeces of InformatIon found In vIrtuaIIy any newspaper? Is thIs a dream?
Maybe not. Anthony Macek expIaIns.
The oId adage about keepIng thIngs sImpIe appIIes even to the Investment worId. Methods
of anaIysIs such as poIarIzed fractaI effIcIency and prIce oscIIIator dIvergences do a great
job, but for those wIth neIther the tIme nor the IncIInatIon to master the technIques
necessary to monItor every bIIp and sputter that the market produces may be served just as
weII by notIng onIy two very Important market varIabIes: prIce and voIume."
For InterpretatIon refer to the June 94 Issue of TechnIcaI AnaIysIs of Stocks & CommodItIes.
You need to create aII of the foIIowIng custom formuIas In order for the PV Rank to caIcuIate
properIy.
http://www.meta-formula.com/Metastock-Formulas-P.html 2014-10-14 14:05:05
Metastock Formulas - P Strona 6
P-V Rank:
FmI( "PV1" ) + FmI( "PV2" )
PV1:
If( C ,> ,Ref( C ,-1 ) ,If( V ,> ,Ref( V ,-1 ) ,1 ,If( V ,< ,Ref(V ,-1 ) ,2 ,0 ) ) ,0 )
PV2:
If( C ,< ,Ref( C ,-1 ) ,If( V ,< ,Ref( V ,-1 ) ,3 ,If( V ,> ,Ref( V ,-1 ) ,4 ,0 ) ) ,0 )
PV BIggIe: (ThIs combInes aII formuIas Into one formuIa)
If( C ,> ,Ref( C ,-1 ) ,If( V ,> ,Ref( V ,-1 ) ,1 ,If( V ,< ,Ref( V ,-1 ) ,2 ,0 ) ) ,If( C ,< ,Ref
( C ,-1 ),If( V ,< ,Ref( V ,-1 ) ,3 ,If( V ,> ,Ref( V ,-1 ) ,4 ,0 ) ) ,0 ) )
(Go Top)
Price Volume Trend Stochastic
{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)
Pathfinder Trading System
To recreate the PathfInder currency tradIng system (descrIbed In the October 1996 IntervIew
wIth NeIson Freeburg) In MetaStock for WIndows, open two charts, one of the desIred
currency and the other of Treasury bonds. For thIs exampIe, I used the SwIss Franc. Choose
TIIe from the WIndow menu so both charts are vIsIbIe. Drag the T-bonds prIce bar and drop
It on the headIng of the currency chart. Your currency chart shouId now have T-bonds
pIotted In the top Inner wIndow of the chart. CIIck on the T-bonds pIot In the currency chart
so It's seIected (that Is, IIttIe squares appear on the prIce bars). You wIII need to seIect the
T-bonds pIot each tIme before runnIng a system test. The seIected pIot teIIs the MetaStock
System Tester what to use for "P". Next, choose System Tester from the TooIs menu, and
then New to create a new system. Enter the foIIowIng system ruIes, stops, and optIons and
then run the test.
Signal Formulas
Enter Long:
Mov(C,6,S) > Ref(Mov(C,6,S),-1) AND
Mov(P,3,S) > Mov(P,25,S) AND
AIert(Cross(Mov(C,9,S),Mov(C,18,S)),10)
Close Long
Cross(Mov(C,18,S),Mov(C,9,S))
Enter Short
Mov(C,6,S) < Ref(Mov(C,6,S),-1) AND
Mov(P,3,S) < Mov(P,25,S) AND
AIert(Cross(Mov(C,18,S),Mov(C,9,S)),10)
Close Short
Cross(Mov(C,9,S),Mov(C,18,S))
Stops
MaxImum Loss Stop:
Long and short posItIons
MaxImum Ioss of 0.016 poInts.
InItIaI equIty PoInts OnIy
PosItIons: Long and short
Trade prIce: Open
Trade deIay: 1
Note that the maxImum stop Ioss amount shouId be changed to 0.032 for the BrItIsh Pound
and 0.02 for the AustraIIan and CanadIan doIIars when testIng these contracts.
(Go Top)
Psychology Index
by GIenn WaIIace
- Futures MagazIne, VoI.29 No.6, June 2000, P.48
There was an overbought/oversoId IndIcator descrIbed In the June 2000 Futures MagazIne
caIIed the PsychoIogIcaI Index. It Iooked sort of InterestIng, so I wrote the MetaStock code
for It:
LookBack:= Input("Number of Iookback perIods", 2, 100, 12);
http://www.meta-formula.com/Metastock-Formulas-P.html 2014-10-14 14:05:05
Metastock Formulas - P Strona 7
UThreshoId:= Input("Upper threshoId (%)", 0, 100, 75);
LThreshoId:= Input("Lower threshoId (%)", 0, 100, 25);
UpDay:= If(CLOSE > Ref(CLOSE,-1), 1, 0);
PsychIndex:= Sum(UpDay,LookBack) / LookBack * 100;
PsychIndex; UThreshoId; LThreshoId
(Go Top)
Periodicity detector
{ Chart perIodIcIty detector }{ References IndIcator "CaIendar Week counter" }{ ©CopyrIght
2003-2004 Jose SIIva }{ josesIIva22@yahoo.com }
dummy:=Input("Chart detected: (1) DaIIy, (2) WeekIy, ",0,0,0);
dummy:=Input(" (3) MonthIy, (4) QuarterIy, (5) YearIy",0,0,0);
Wk:=FmI("CaIendar Week counter");
{FortnIghtCount:=Int((Wk+1)/2);}
m:=Month();
Mth:=Cum(m<>VaIueWhen(2,1,m));
q:=If(m=1 OR m=2 OR m=3,1,
If(m=4 OR m=5 OR m=6,2,
If(m=7 OR m=8 OR m=9,3,4)));
Qtr:=Cum(q<>VaIueWhen(2,1,q));
Yr:=Cum(Year()<>VaIueWhen(2,1,Year()));
chart:=If(LastVaIue(Cum(Wk=VaIueWhen(2,1,Wk)))=0,2,1);
chart:=If(LastVaIue(Cum(Mth=VaIueWhen(2,1,Mth)))=0,3,chart);
chart:=If(LastVaIue(Cum(Qtr=VaIueWhen(2,1,Qtr)))=0,4,chart);
chart:=If(LastVaIue(Cum(Yr=VaIueWhen(2,1,Yr)))=0,5,chart);
chart
Periodicity detector app example
{Chart perIodIcIty detector appIIcatIon exampIe}{AutomatIcaIIy adjusts EMA to chart
perIodIcIty}{ References IndIcator "CaIendar Week counter" }{ ©CopyrIght 2003-2004 Jose
SIIva }{ josesIIva22@yahoo.com }
Wk:=FmI("CaIendar Week counter");
{Frt:=Int((Wk+1)/2);}
m:=Month();
Mth:=Cum(m<>VaIueWhen(2,1,m));
q:=If(m=1 OR m=2 OR m=3,1,
If(m=4 OR m=5 OR m=6,2,
If(m=7 OR m=8 OR m=9,3,4)));
Qtr:=Cum(q<>VaIueWhen(2,1,q));
Yr:=Cum(Year()<>VaIueWhen(2,1,Year()));
chart:=If(LastVaIue(Cum(Wk=VaIueWhen(2,1,Wk)))=0,2,1);
chart:=If(LastVaIue(Cum(Mth=VaIueWhen(2,1,Mth)))=0,3,chart);
chart:=If(LastVaIue(Cum(Qtr=VaIueWhen(2,1,Qtr)))=0,4,chart);
chart:=If(LastVaIue(Cum(Yr=VaIueWhen(2,1,Yr)))=0,5,chart);
pds:=Input("daIIy EMA perIods",1,25200,126);
x:=Input("use Open=1 HIgh=2 Low=3 CIose=4 VoIume=5 P=6",1,6,6);
shIft:=1+Input("EMA vertIcaI shIft %",
-100,100,0)/100;
pIot:=Input("EMA=1, Crossover sIgnaIs=2",1,2,1);
x:=If(x=1,O,If(x=2,H,If(x=3,L,If(x=5,V,If(x=6,P,C)))));
pds:=If(chart=1,pds,If(chart=2,pds/5,
If(chart=3,pds/21,If(chart=4,pds/63,pds/252))));
pds:=If(pds<1,1,pds);
pds:=If(pds>Cum(IsDefIned(x)),
Cum(IsDefIned(x)),pds);
Ema:=x*2/(pds+1)+PREV*(1-2/(pds+1));
Ema:=Ema*shIft;
sIgnaIs:=Cross(x,Ema)-Cross(Ema,x);
If(pIot=2,sIgnaIs,Ema)
Calendar Week counter
{ Week counter v2.0, GregorIan caIendar }{ Count Is Independent of any mIssIng chart
data }{ ©CopyrIght 2003-2004 Jose SIIva }{ josesIIva22@yahoo.com }
IImIt:=2000; {do not change IImIt year}
LImLeap:=Frac(IImIt/4)=0 AND Frac(IImIt/100)<>0
OR Frac(IImIt/400)=0;
NoCount:=IImIt*365+Int(IImIt/4)
-Int(IImIt/100)+Int(IImIt/400)-LImLeap;
Ieap:=Frac(Year()/4)=0 AND Frac(Year()/100)<>0
OR Frac(Year()/400)=0;
y:=Year()*365+Int(Year()/4)
-Int(Year()/100)+Int(Year()/400)-NoCount;
m:=
http://www.meta-formula.com/Metastock-Formulas-P.html 2014-10-14 14:05:05
Metastock Formulas - P Strona 8
If(Month()=2,31-Ieap,
If(Month()=3,59,
If(Month()=4,90,
If(Month()=5,120,
If(Month()=6,151,
If(Month()=7,181,
If(Month()=8,212,
If(Month()=9,243,
If(Month()=10,273,
If(Month()=11,304,
If(Month()=12,334,
-Ieap)))))))))));
DayNr:=y+m+DayOfMonth();
WkCount:=Int((DayNr-1)/7)+(Year()>=IImIt);
WkCount
(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-P.html 2014-10-14 14:05:05
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 S
Metastock Formulas G
Metastock Formulas J
Metastock Formulas H
Metastock Formulas H
Metastock Formulas U
Metastock Formulas I
Metastock Formulas B 1
więcej podobnych podstron