Metastock Formulas - T Strona 1
Metastock Formulas - T
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
TASC Trader's Tip: Volatility % Indicator (Dec Trading the Trend 2
MetaStock Llnks
'97) Trailing Stop Loss Indicator
Tema PV Binary Wave Trending Bandini
Rave Revlews
Tema PV Binary Wave and Tema QStick True Range Formula
Formulas--use of True Strength Index
About Us
Tema StochRSI Formula TSF Optimised Trading System for
Three inside Days Metastock
Tom Demark's Range Expansion Index TSI and TSI Moving Average
Contact Us
Trading the Trend 1 Trendline Formula
The New Advance Decline Line Tushar Chande's Target Price
SlteMap
Tick Line Momentum Oscillator Tushar Chande's Vidya with
Trading Channel Index Volatility Bands
Trailing Stop - Elder's SafeZone
Trailing Stop - MetaStock
Trendline - adjustable
TASC Trader's Tip: Volatility % Indicator (Dec '97)
You can easIIy create the VoIatIIIty% IndIcator from WIIIIam Brower s artIcIe In MetaStock for
WIndows. FIrst choose IndIcator BuIIder from the TooIs menu In MetaStock. Next choose
New and enter one of the foIIowIng formuIas:
FormuIa for MetaStock 6.5
VoIatIIIty%
Lookback := Input("TIme PerIods",1,1000,50);
HIghVoIatIIIty := Input("HIgh VoIatIIIty %",.01,100,3);
100 * Sum(100 * ATR(1)/CLOSE > HIghVoIatIIIty, Lookback)/Lookback
(Go Top)
Tema PV Binary Wave
Use of Tema PV BInary Wave and Tema QStIck FormuIas In MetaStock, from "JImG"
There are reaIIy two dIfferent ways to use these formuIas. SInce the BInary Wave Is a
smoothed addItIon of severaI technIcaI IndIcators that each gIve +1 when buIIIsh, 0 when
neutraI and -1 when negatIve, It makes sense that a posItIve number Is buIIIsh and rIsIng
numbers are buIIIsh. SImIIarIy negatIve numbers and faIIIng numbers are bearIsh.
The QStIck Is reaIIy a candIestIck type IndIcator, but can be read as buIIIsh or bearIsh In
same way as the BInary Wave.
The two tradItIonaI ways to pIay them are to buy on a rIse from a negatIve peak and seII on
a faII from a posItIve peak, or to buy on a zero cross over to the upsIde and seII on a zero
http://www.meta-formula.com/Metastock-Formulas-T.html 2014-10-14 14:05:43
Metastock Formulas - T Strona 2
crossover to the downsIde. Of course you can optImIze and fInd varIous buy and seII IeveIs
as Iong as you understand what Is bearIsh and what Is buIIIsh.
My own MetaStock system tests aIerts on the BW crossIng a movIng average of ItseIf and
buys or seIIs on a confIrmatIon of QstIck turnIng posItIve or negatIve respectIveIy. HavIng
saId that, I don't make my buy an seII decIsIons from the IndIcators or the system test. I do
use the system test as an InItIaI screen and use a buy sIgnaI as a fIag to move the stock to
my watch IIst. I make aII buyIng and seIIIng decIsIons based on the trend channeIs. Over the
years, I've found that works best for me.
(Go Top)
Tema PV Binary Wave and Tema QStick Formulas--use of
In MetaStock, from "JImG"
There are reaIIy two dIfferent ways to use these formuIas. SInce the BInary Wave Is a
smoothed addItIon of severaI technIcaI IndIcators that each gIve +1 when buIIIsh, 0 when
neutraI and -1 when negatIve, It makes sense that a posItIve number Is buIIIsh
and rIsIng numbers are buIIIsh. SImIIarIy negatIve numbers and faIIIng numbers are bearIsh.
The QStIck Is reaIIy a candIestIck type IndIcator, but can be read as buIIIsh or bearIsh In
same way as the BInary Wave.
The two tradItIonaI ways to pIay them are to buy on a rIse from a negatIve peak and seII on
a faII from a posItIve peak, or to buy on a zero cross over to the upsIde and seII on a zero
crossover to the downsIde. Of course you can optImIze and fInd varIous buy and seII IeveIs
as Iong as you understand what Is bearIsh and what Is buIIIsh.
My own MetaStock system tests aIerts on the BW crossIng a movIng average of ItseIf and
buys or seIIs on a confIrmatIon of QstIck turnIng posItIve or negatIve respectIveIy. HavIng
saId that, I don't make my buy an seII decIsIons from the IndIcators or the system test. I do
use the system test as an InItIaI screen and use a buy sIgnaI as a fIag to move the stock to
my watch IIst. I make aII buyIng and seIIIng decIsIons based on the trend channeIs. Over the
years, I've found that works best for me.
The HIGHER CLOSES MetaStock expIoratIon shouId be entered as foIIows:
coIA CLOSE
coIB ref(C,-1)
coIC ref(C,-2)
fIIter coIA > coIB AND coIB > coIC
{GeneraI Purpose IntermedIate Term MACD IndIcator}
( Mov( C,13,E ) - Mov( C,34,E ) ) - Mov( ( Mov( C,13,E ) - Mov( C,34,E ) ),89,E )
{GeneraI Purpose Short Term MACD IndIcator}
( Mov( C,8,E ) - Mov( C,17,E ) ) - Mov( ( Mov( C,8,E ) - Mov( C,17,E ) ),9,E )
(Go Top)
Tema StochRSI Formula
I use Is Tema smoothed and I subtract 0.5 so I can pIot It as a hIstogram. It's:}
PerIods := Input("Enter Tema SmoothIng PerIods",5,233,13);
Tema(((RSI(PerIods) - LLV(RSI(PerIods),PerIods)) / ((0.0001+HHV(RSI(PerIods),PerIods)) -
LLV(RSI(PerIods),PerIods))) -0.5,PerIods)
(Go Top)
Three inside Days
InsIde days suggest a voIatIIIty compressIon and often preceede strong breakouts. Search
returns 1 for ok and 0 for not ok
InsIde()
InsIde()-1
InsIde()-2
(Go Top)
Tom Demark's Range Expansion Index
TDREI
TD1:= H-Ref(H,-2);
TD2:= L-Ref(L,-2);
TD3:= If((H>=Ref(L,-5) OR H>=Ref(L,-6)) AND (L<=Ref(H,-5) OR L<=Ref(H,-6)),1,0);
TD4:= If((Ref(H,-2)>=Ref(C,-7) OR Ref(H,-2)>=Ref(C,-8)) AND (Ref(L,-2)<=Ref(C,-7)
OR Ref(L,-2)<=Ref(C,-8)),1,0);
TD6:= (TD1) + (TD2);
TD5:= If((TD3) + (TD4)>=1, (TD6), 0);
TD7:= Abs(TD1) + Abs(TD2);
TDREI:=((TD5) + Ref(TD5,-1) + Ref(TD5,-2) + Ref(TD5,-3) + Ref(TD5,-4))/ (TD7) + Ref
http://www.meta-formula.com/Metastock-Formulas-T.html 2014-10-14 14:05:43
Metastock Formulas - T Strona 3
(TD7,-1) + Ref(TD7,-2) + Ref(TD7,-3) + Ref(TD7,-4)*100;
TDREI;
(Go Top)
Trading the Trend 1
TTT--TREND TRAILING IndIcator -- Andrew Abraham
CouId have been caIIed:
STOP LOSS IndIcator
SUPPORT & RESISTANCE IndIcator
DYNAMIC SUPPORT & RESISTANCE IndIcator
BUY/SELL TRIGGER IndIcator
INVESTORS DREAM IndIcator
TRADING IndIcator
fmI("VOLAInd"): Mov(ATR(21),1,W)*3;
If(C>Ref(C,-21) AND C>fmI("VOLAInd"),
HHV(H,21)-Ref(fmI("VOLAInd"),-1), Ref(fmI("VOLAInd"),-1)+LLV(L,21))
.or.
VOLAInd :=Mov(ATR(21),1,W)*3;
If(C>Ref(C,-21) AND C>VOLAInd, HHV(H,21)-Ref(VOLAInd,-1),
Ref(VOLAInd,-1)+LLV(L,21))
{CHANGE BAR COLORS: doubIe cIIck on the prIce pIot In the chart, from the CoIor/StyIe
page cIIck the UP drop-IIst and choose darkbIue for upwards, and red for downward prIce
changes}
(Go Top)
Trading the Trend 2
TradIng the Trend (TTT) -- by Andrew Abraham, TASC MagazIne 9/1998, was about one
form of stopIoss exIt: subtract some manIpuIatIon of the true range from the hIghest hIgh
(or add It to the Iowest Iow) and exIt when the cIose crosses that. (Members of Chuck
LeBeau's Traders CIub wIII recognIse the "ChandeIIer ExIt".)
THE CHANDELIER EXIT: The exIt stop Is pIaced at a muItIpIe of average true ranges from
the hIghest hIgh or hIghest cIose sInce the entry of the trade. As the hIghs get hIgher the
stop moves up but It never moves downward.
In MS 6.5 as a varIabIe or custom IndIcator : DaysInTrade:= BarssInce(prevIous composIte
entry crIterIa = 1)
THE YO YO EXIT: ThIs exIt Is very sImIIar to the ChandeIIer ExIt except that the ATR stop Is
aIways pegged to the most recent cIose Instead of the hIghest hIgh. SInce the cIoses move
hIgher and Iower, the stop aIso moves up and down (hence the Yo Yo name).
Name: TradIng the Trend
Pds:=21;
MuIt:=3;
TruRan:=Mov(ATR(1),Pds,W)*MuIt;
HILImIt:=HHV(H,Pds)-TruRan;
LoLImIt:=LLV(L,Pds)+TruRan;
If(C>HILImIt,HILImIt,LoLImIt)
After cIosIng the IndIcator BuIIder cIIck on the Expert AdvIsor (the guy In the bowIer/
1.
derby hat).
CIIck on New, then the Name tab, type In TradIng the Trend.
2.
CIIck on the HIghIIghts tab, seIect the fIrst IIne so that It Is hIghIIghted, cIIck EdIt,
3.
type In the name Uptrend, seIect CoIour BIue, seIect CondItIon, type In C>FmIVar
("TradIng the Trend","HILImIt"), and cIIck OK,
StIII on the HIghIIghts tab, seIect the second IIne, cIIck EdIt, type In the name
4.
Downtrend, seIect CoIor Red, seIect CondItIon, type In C<=FmIVar("TradIng the
Trend","HILImIt"), cIIck OK, and then cIIck OK agaIn.
If you have a chart open that you want to use thIs on, cIIck Attach, otherwIse cIIck
5.
CIose. In the Iatter case, when you open a chart and pIot the trendIIne, cIIck on the
Expert AdvIsor, seIect TradIng the Trend, and cIIck on Attach.
I've gIven the Expert steps In detaII for any who may not be famIIIar wIth Its use. To
experIment wIth varIatIons In the Iookback perIods and the muItIpIIer you can do so In eIther
the IndIcator BuIIder, or rIght-cIIck the IndIcator on the chart, seIect PropertIes, then the
FormuIa tab, and make the changes (e.g. try a Iookback perIod of 10, and a muItIpIIer of
2.5). As ImpIemented above, the Expert shouId change accordIngIy. ThIs shows the trade-
offs that have to be made
between near and dIstant stops. ThIs Is too rudImentary to be traded as a system - the
http://www.meta-formula.com/Metastock-Formulas-T.html 2014-10-14 14:05:43
Metastock Formulas - T Strona 4
whIpsaws wouId chop you to pIeces - but the exIts shouId heIp to IImIt drawdowns.
A very sImIIar stopIoss Is gIven In Chande & KroII "The New TechnIcaI Trader", pp.167 - 169,
"VoIatIIIty-Based TraIIIng Stops". My preference Is to pIot both the hIgh and the Iow exIt
IInes In contrastIng coIours, dIspensIng wIth the swItch between them, and dIspensIng wIth
the Expert. If anyone wants heIp wIth the code, just say so.
AssumIng you entered everythIng exactIy In both the IndIcator BuIIder and the Expert
AdvIsor, one questIon comes to mInd. DId you decIde to adapt the formuIa to MS v.6.5 and
use an Input functIon for Pds and MuIt? It seems IIke a IogIcaI thIng to do, and In fact I
coded It that way at fIrst. The probIem Is that the Expert AdvIsor aIways reverts to the
defauIt vaIue (the System Tester does the same thIng).
Thus If you used somethIng IIke:
Pds:=Input("Lookback PerIods?",1,1000,20)
and then when you appIIed It you changed the perIods to 15, the Expert AdvIsor wIII stIII
read 20. I hard-coded the Pds and MuIt parameters for that reason.
(Go Top)
Trailing Stop Loss Indicator
If(cum(1)=1,
{then} CIose,
{eIse} If((C*1.1) <= PREV,
{then}(C*1.1),
{eIse} PREV));
{from Adam Hefner}
{RegardIng the RecursIve MovIng TrendIIne System, I ended up makIng an oscIIIator out of
It (subtractIng the ema from the rta). If you wIsh to try "tunIng" It In MetaStock, you couId
try dIfferent entry IeveIs from the oscIIIator. For exampIe, go Iong when TOSC crosses from
beIow -2, or go short when TOSC crosses from above +2. }
{TOSC}
Lb:=Input("Look-Back PerIod?",3,100,21);
Ty:=Input("1=C 2=H 3=L 4= MedIan PrIce",1,4,1);
Tv:=If(Ty=1,C,If(Ty=2,H,If(Ty=3,L,MP())));
AIpha:=2/(LB+1);
Bot:=(1-AIpha)*(If(Cum(1)
RMTA:=(1-AIpha)*(If(Cum(1)(AIpha*(Tv+Bot-Ref(Bot,-1)));
TOSC:=RMTA-Mov(Tv,Ib,E);
TOSC;
{NOTE: thIs code wIII work sIowIy because of aII of the "PREV" functIons. from Adam
Hefner.}
{SIngIe 60 Day PerIod BreakOut SIgnaI IndIcator}
ACoI:= C;
BCoI:= Ref(HHV(H,59), -1);
CCoI:= HHV(H,60);
SSDPBOS:= (ACoI>BCoI) AND (Ref(C,-1)(H=CCoI);
SSDPBOS
(Go Top)
Trending Bandini
Mov(C,2,S)>
Mov(Mov(C,2,S),2,S) AND
Mov(Mov(C,2,S),2,S)>
Mov(Mov(Mov(C,2,S),2,S),2,S) AND
Mov(Mov(Mov(C,2,S),2,S),2,S)>
Mov(Mov(Mov(Mov(C,2,S),2,S),2,S),2,S) AND
Mov(Mov(Mov(Mov(C,2,S),2,S),2,S),2,S)>
Mov(Mov(Mov(Mov(Mov(C,2,S),2,S),2,S),2,S),2,S) AND
Mov(Mov(Mov(Mov(Mov(C,2,S),2,S),2,S),2,S),2,S)>
Mov(Mov(Mov(Mov(Mov(Mov(C,2,S),2,S),2,S),2,S),2,S),2,S) AND
Mov(Mov(Mov(Mov(Mov(Mov(C,2,S),2,S),2,S),2,S),2,S),2,S)>
Mov(Mov(Mov(Mov(Mov(Mov(Mov(C,2,S),2,S),2,S),2,S),2,S),2,S),2,S) AND
Mov(Mov(Mov(Mov(Mov(Mov(Mov(C,2,S),2,S),2,S),2,S),2,S),2,S),2,S)>
Mov(Mov(Mov(Mov(Mov(Mov(Mov(Mov(C,2,S),2,S),2,S),2,S),2,S),2,S),2,S),2,S) AND
Mov(Mov(Mov(Mov(Mov(Mov(Mov(Mov(C,2,S),2,S),2,S),2,S),2,S),2,S),2,S),2,S)>
Mov(Mov(Mov(Mov(Mov(Mov(Mov(Mov(Mov(C,2,S),2,S),2,S),2,S),2,S),2,S),2,S),2,S),2,S)
AND
Mov(Mov(Mov(Mov(Mov(Mov(Mov(Mov(Mov(C,2,S),2,S),2,S),2,S),2,S),2,S),2,S),2,S),2,S)>
Mov(Mov(Mov(Mov(Mov(Mov(Mov(Mov(Mov(Mov(C,2,S),2,S),2,S),2,S),2,S),2,S),2,S),2,S)
,2,S),2,S)
(Go Top)
http://www.meta-formula.com/Metastock-Formulas-T.html 2014-10-14 14:05:43
Metastock Formulas - T Strona 5
True Range Formula
TR = (H - L + Abs(H - Ref(C,-1)) + Abs(L - Ref(C,-1)) )/2
(Go Top)
True Strength Index
{Appeared In the January 1993 Issue of Stocks & CommodItIes magazIne}
100 * ( Mov( Mov( ROC(C,1,$),25,E),13,E) / Mov( Mov( Abs(ROC(C,1,$)),25,E),13,E))
(Go Top)
TSF Optimised Trading System for Metastock
Enter Iong:
Cross(opt1,((CLOSE-Ref(TSF(C,opt3),-1))/CLOSE*100))
CIose Iong:
Cross(((CLOSE-Ref(TSF(C,opt3),-1))/CLOSE*100),opt2)
Enter short:
Cross(((CLOSE-Ref(TSF(C,opt3),-1))/CLOSE*100),opt2)
CIose short:
Cross(opt1,((CLOSE-Ref(TSF(C,opt3),-1))/CLOSE*100))
opt 1: zero to -2 (wIth .1 step)
opt 2: zero to +2 (wIth .1 step)
opt 3: 2 to 8 (wIth 1 step)
{I use thIs for futures and the above parameters (optImIzed settIngs) keep It In the baIIpark.
If you are appIyIng It to equItIes (or commodItIes), It aIways makes sense to Iook at the
IndIcator and understand the outsIde parameters for each of Its "steps". It makes no sense
to IImIt your outsIde IImIts to -2 and +2 If the TSF oscIIIates between -8 and +8. So do a
IIttIe homework on the "outsIde" IImIts of the IndIcator and then optImIze accordIngIy. from
Steve KarnIsh.}
(Go Top)
TSI and TSI Moving Average
100*(Mov(Mov(Roc(C,1,$),25,E),13,E)/Mov(Mov(Abs(Roc(c,1,$)),25,E),13,E))
Mov(FmI("TSI"),20,E)
(Go Top)
The New Advance Decline Line
The formuIas and steps necessary to do the New Advance -DecIIne LIne from the September
1994 TechnIcaI AnaIysIs of Stocks & CommodItIes, page 14 by DanIeI DownIng are:
Taken from Stocks & CommodItIes, V. 12:9 (363-365): A New Advance-DecIIne LIne by
DanIeI E. DownIng
"Here's a tradIng tooI that uses a unIque versIon of the daIIy advance-decIIne IIne of the
New York Stock Exchange (NYSE). ThIs versIon heIps In our short- and Iong-term tradIng of
Index optIons and stock Index futures. It gIves many good short-term tradIng sIgnaIs and
exceIIent but Infrequent Ionger-term sIgnaIs&
The phIIosophy behInd thIs tooI Is that the short-term trader's capItaI Is fInIte and that
traders have to reIIquIfy theIr hoIdIngs after a perIod. Traders can buy and try to push the
equItIes hIgher onIy so many tImes before they need to reIIquIfy, just as onIy a fInIte amount
of seIIIng waves can take pIace before the seIIers are out of suppIIes. A tooI that poInts to
when short-term traders need to reIIquIfy theIr posItIons wIII aIso spot when the markets wIII
soon reverse theIr trends."
For the Windows versions of MetaStock:
Load the advances
Load the decIInes
Drag the pIot of the advances Into the chart of the decIInes
PIot the foIIowIng custom formuIa dIrectIy on the pIot of advances.
Cum( If( P ,>= ,1000 ,If(C ,< ,1000 , + 1 ,0 ) ,If( C ,>= ,1000 ,-1 ,0 ) ) )
http://www.meta-formula.com/Metastock-Formulas-T.html 2014-10-14 14:05:43
Metastock Formulas - T Strona 6
(Go Top)
Tick Line Momentum Oscillator
In hIs artIcIe "Using The Tick In A Short-Term Indicator", In the January 94 Issue of TASC,
DanIeI E. DownIng presents the TIck LIne Momentum OscIIIator.
Taken from Stocks & CommodItIes, V. 12:1 (42-44): UsIng The TIck In A Short-Term
IndIcator by DanIeI E. DownIng
"The tIck Index, the net dIfference of the numbers of stocks Iast traded on an uptIck from
those Iast traded on a downtIck , Is a weII-known IndIcator, but It's got a probIem. The raw
number resuIt Is voIatIIe, perhaps too voIatIIe for some. What to do? here, then, Is a way to
smooth out the noIse to IdentIfy short-term tradIng opportunItIes.
The tIck Is a basIc unIt for the markets, watched wIth fascInatIon durIng perIods of turmoII
and perIods of enthusIasm. It Is quoted throughout the day on most quote servIces. In
addItIon, the cIosIng tIck vaIue can be found on the market statIstIcs pages of fInancIaI
newspapers such as Barron's and The WaII Street JournaI. Let me present, then, the tIck
IIne momentum oscIIIator, whIch Is based on the cIosIng vaIue for the New York Stock
Exchange (NYSE) tIck IndIcator. The oscIIIator has been shown to have a good track record
of determInIng when the NYSE Is overbought or oversoId on a short-term basIs. The formuIa
for the tIck IIne momentum oscIIIator Is sImpIe and can be easIIy caIcuIated wIthout a
computer, aIthough a spreadsheet versIon can be found In the sIdebar, "TIck IIne
momentum." FInaIIy, the oscIIIator Is straIghtforward and sImpIe to appIy."
The MetaStock formuIa for the TIck LIne Momentum OscIIIator Is:
Mov( ROC( Cum( If( C ,> ,Ref( Mov(C ,10 ,E ) ,-1 ) ,+1 ,If( C ,< ,Ref( Mov( C ,10 ,E )
,-1 ) ,- 1 ,0 ) ) ) ,5 ,$ ) ,5 ,E )
(Go Top)
Trading Channel Index
The TradIng ChanneI Index comes from an earIy versIon of AIQ's Stock Expert program.
"The TradIng ChanneI Index measures the IocatIon of average daIIy prIce reIatIve to a
smoothed average of average daIIy prIce. It Is derIved from the average dIfference between
these two vaIues."
To create the TradIng ChanneI Index In MetaStock create the foIIowIng custom formuIa's:
AP+: Average prIce
( H + L + C ) / 3
ESA+: Smoothed prIce average
Mov( FmI( "AP+" ) ,10 ,E ) + ( Mov( Ref( FmI( "AP+" ) ,-1 ) ,10 ,E ) )
D+: PrIce range estImate
Mov( ( FmI( "AP+" ) - FmI( "ESA+" ) ) ,10 ,E ) + ( Mov( Ref( FmI( "AP+" ) - FmI( "ESA+" )
,-1 ) ,10 ,E ) )
CI+: ChanneI Index
( ( FmI( "AP+" ) - FmI( "ESA+" ) ) / ( 0.015 * FmI( "D+" ) ) )
TRADING CHANEL INDEX:
Mov( FmI( "CI+" ) ,21 ,E ) + ( Mov( Ref( FmI( "CI+" ) ,-1 ) ,21 ,E ) )
(Go Top)
Trendline Formula
Trough(1,L,10)+((((Trough(1,L,10)-Trough(2,L,10))/(TroughBars(2,L,10)-TroughBars
(1,L,10)))
*TroughBars(1,L,10)))
ThIs formuIa wIII draw a trendIIne from the most recent bottom.
The L (Iow) can be changed to C (cIose) and the 10 can be changed to a dIfferent percent
vaIue.
You wIII aIso need to change the IIne styIe to the Iast one In thedrop down IIst.
(Go Top)
Tushar Chande's Target Price
A:=Mov(Abs(C-Ref(C,-1)),10,S);
TPH1:=C+A;
TPH2:=C+(2*A);
http://www.meta-formula.com/Metastock-Formulas-T.html 2014-10-14 14:05:43
Metastock Formulas - T Strona 7
TPL1:=C-A;
TPL2:=C-(2*A);
TPH1;
TPH2;
TPL1;
TPL2;
(Go Top)
Tushar Chande's Vidya with Volatility 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;
(Go Top)
Trailing Stop - Elder's SafeZone
{ Dr AIexander EIder's SafeZone traIIIng stop v2 }{ TrIggers: Long (+1) & Short (-1) sIgnaIs
at crossover of user-defIned traIIIng stops }{ ©CopyrIght 2003 Jose SIIva }{ josesIIva22@
yahoo.com }
coeffIcIent:=Input("SafeZone coeffIcIent",
0,10,2.5);
bkpds:=Input("Lookback perIods",1,252,10);
pds:=Input("Trend EMA perIods",2,252,21);
adv:=Input("pIot: today's SafeZone=0, tomorrow's stop=1",0,1,0);
pIot:=Input("pIot: traIIIng stop=1, Long+Short=2, sIgnaIs=3",1,3,1);
deIay:=Input("Entry and ExIt sIgnaI deIay",
0,5,0);
DwSIdePen:=Mov(C,pds,E)>Ref(Mov(C,pds,E),-1)
AND L[DwSIdeDIff:=If(DwSIdePen,Ref(L,-1)-L,0);]
DwPenAvg:=Sum(DwSIdeDIff,bkpds)
/(Sum(DwSIdePen,bkpds)+.000001);
StLong:=Ref(L-DwPenAvg*coeffIcIent,-1);
StopLong:=If(CUpSIdePen:=Mov(C,pds,E)[AND H>Ref(H,-1);]
UpSIdeDIff:=If(UpSIdePen,H-Ref(H,-1),0);
UpPenAvg:=Sum(UpSIdeDIff,bkpds)
/(Sum(UpSIdePen,bkpds)+.000001);
StShort:=Ref(H+UpPenAvg*coeffIcIent,-1);
StopShort:=If(C>PREV,StShort,MIn(StShort,PREV));
In:=Cross(C,Ref(StopShort,-1));
Out:=Cross(Ref(StopLong,-1),C);
fIag:=BarsSInce(Cum(In+Out>-1)=1 OR In)
< BarsSInce(Cum(In+Out>-1)=1 OR Out)
+(Cum(In)=1);
sIgnaIs:=Ref((Cum(In)=1
AND AIert((Cum(In)=1)=0,2)
OR fIag AND AIert(fIag=0,2))
-(fIag=0 AND AIert(fIag,2)),-deIay);
If(pIot=1,Ref(If(fIag=1,stopLong,stopShort),
-1+adv),If(pIot=2,Ref(stopLong,-1+adv),0));
If(pIot=1,Ref(If(fIag=1,stopLong,stopShort),
-1+adv),If(pIot=2,Ref(stopShort,-1+adv),
sIgnaIs))
(Go Top)
Trailing Stop - MetaStock
{ TrIggers: Long (+1) & Short (-1) sIgnaIs at crossover of user-defIned traIIIng stops }{ x23
sIower than TradeSIm's versIon }{ ©CopyrIght 2003-2004 Jose SIIva }{ josesIIva22@
yahoo.com }
buffer:=Input("buffer % traIIIng stop",0,100,8);
pIot:=Input("pIot: traIIIng stop=1, Long+Short=2, sIgnaIs=3",1,3,1);
adv:=Input("pIot: today's traIIIng stop=0, tomorrow's stop=1",0,1,0);
deIay:=Input("Entry and ExIt sIgnaI deIay",
0,5,0);
StLong:=C-C*buffer/100;
StShort:=C+C*buffer/100;
stopLong:=If(Chttp://www.meta-formula.com/Metastock-Formulas-T.html 2014-10-14 14:05:43
Metastock Formulas - T Strona 8
stopShort:=If(C>PREV,StShort,MIn(StShort,PREV));
In:=Cross(C,Ref(stopShort,-1));
Out:=Cross(Ref(stopLong,-1),C);
InIt:=Cum(In+Out>-1)=1;
InInIt:=Cum(In)=1;
fIag:=BarsSInce(InIt OR In)
< BarsSInce(InIt OR Out)+InInIt;
sIgnaIs:=Ref((InInIt AND AIert(InInIt=0,2)
OR fIag AND AIert(fIag=0,2))
-(fIag=0 AND AIert(fIag,2)),-deIay);
stop:=Ref(If(fIag=1,stopLong,stopShort),-1+adv);
If(pIot=1,stop,
If(pIot=2,Ref(stopLong,-1+adv),0));
If(pIot=1,stop,
If(pIot=2,Ref(stopShort,-1+adv),sIgnaIs))
Trailing Stop - TradeSim
{ TrIggers: Long (+1) & Short (-1) sIgnaIs at crossover of user-defIned traIIIng stops }{ x23
faster than MetaStock's 4-PREV versIon }{ TradeSIm.dII must be In
...\MetaStock\ExternaI FunctIon DLLs\ foIder }{ ©CopyrIght 2003-2004 Jose SIIva }
{ josesIIva22@yahoo.com }
buffer:=Input("buffer % traIIIng stop",0,100,8);
pIot:=Input("pIot: traIIIng stop=1, Long+Short=2, sIgnaIs=3",1,3,1);
adv:=Input("pIot: today's traIIIng stop=0, tomorrow's stop=1",0,1,0);
deIay:=Input("Entry and ExIt sIgnaI deIay",
0,5,0);
VoIatIIIty:=C*buffer/100;
stopLong:=ExtFmI("TradeSIm.TraIIIngStop",
BAND, {mode: band or trIgger}
LONG, {Iong or short}
VoIatIIIty, {user defIned see varIabIe above}
CLOSE, {RefPoInt for stop caIc}
CLOSE); {threshoId - stop breached}
stopShort:=ExtFmI("TradeSIm.TraIIIngStop",
BAND,SHORT,VoIatIIIty,C,C);
In:=Cross(C,Ref(stopShort,-1));
Out:=Cross(Ref(stopLong,-1),C);
InIt:=Cum(In+Out>-1)=1;
InInIt:=Cum(In)=1;
fIag:=BarsSInce(InIt OR In)
< BarsSInce(InIt OR Out)+InInIt;
sIgnaIs:=Ref((InInIt AND AIert(InInIt=0,2)
OR fIag AND AIert(fIag=0,2))
-(fIag=0 AND AIert(fIag,2)),-deIay);
stop:=Ref(If(fIag=1,stopLong,stopShort),-1+adv);
If(pIot=1,stop,
If(pIot=2,Ref(stopLong,-1+adv),0));
If(pIot=1,stop,
If(pIot=2,Ref(stopShort,-1+adv),sIgnaIs))
Trailing Stop - AdvTrailStop plug-in
{ PIot on prIce chart }{ TrIggers: Long (+1) & Short (-1) sIgnaIs at crossover of user-
defIned traIIIng stops }{ Much faster than MetaStock's 4-PREV versIon }{ ©CopyrIght 2004
Jose SIIva }{ josesIIva22@yahoo.com }
{ AdvancedStop.dII must be In ...\MetaStock\ExternaI FunctIon DLLs\ foIder }
{ AdvancedStop.dII by RIchard DaIe, free from: http://www.tradernexus.com/advancedstop/
advancedstop.htmI }
buffer1:=
Input("InItIaI stop % buffer",0,100,5)/100;
buffer2:=
Input("traIIIng stop % buffer",0,100,8)/100;
pIot:=Input("pIot: traIIIng stop=1, Long+Short=2, sIgnaIs=3",1,3,1);
adv:=Input("pIot: today's traIIIng stop=0, tomorrow's stop=1",0,1,0);
deIay:=Input("Entry and ExIt sIgnaI deIay",
0,5,0);
entrySIgnaI:=C=C;
InItIaIStopLong:=C*(1-buffer1);
traIIStopLong:=C*(1-buffer2);
stopLong:=ExtFmI("AdvancedStop.StopLong",
entrySIgnaI,InItIaIStopLong,0,traIIStopLong,
0,0,0,0);
exItSIgnaI:=Cross(stopLong,C);
InItIaIStopShort:=C*(1+buffer1);
traIIStopShort:=C*(1+buffer2);
stopShort:=ExtFmI("AdvancedStop.StopShort",
http://www.meta-formula.com/Metastock-Formulas-T.html 2014-10-14 14:05:43
Metastock Formulas - T Strona 9
exItSIgnaI,InItIaIStopShort,0,traIIStopShort,
0,0,0,0);
entrySIgnaI:=Cross(C,stopShort);
stopLong:=ExtFmI("AdvancedStop.StopLong",
entrySIgnaI,InItIaIStopLong,0,traIIStopLong,
0,0,0,0);
In:=Cross(C,Ref(stopShort,-1));
Out:=Cross(Ref(stopLong,-1),C);
InIt:=Cum(In+Out>-1)=1;
fIag:=BarsSInce(InIt OR In)
< BarsSInce(InIt OR Out)+(Cum(In)=1);
sIgnaIs:=Ref(((Cum(In)=1)
AND AIert((Cum(In)=1)=0,2)
OR fIag AND AIert(fIag=0,2))
-(fIag=0 AND AIert(fIag,2)),-deIay);
stop:=Ref(If(fIag=1,stopLong,stopShort),-1+adv);
If(pIot=1,stop,
If(pIot=2,Ref(stopLong,-1+adv),0));
If(pIot=1,stop,
If(pIot=2,Ref(stopShort,-1+adv),sIgnaIs))
(Go Top)
Trendline - adjustable
{ ©CopyrIght 2003 Jose SIIva }{ josesIIva22@yahoo.com }
pds:=
Input("average trend Iength perIods",2,252,21);
pr:=Input("Open=1 HIgh=2 Low=3 CIose=4 VoI=5 MP=6, P=7",1,7,4);
dIspIay:=Input("pIot Trend IIne = 1, Trend poInts = 2",1,2,1);
{defIne events}
pr:=If(pr=1,O,If(pr=2,H,If(pr=3,L,If(pr=5,V,
If(pr=6,MP(),If(pr=7,P,C))))));
prIce1:=pr;
prIce2:=pr;
tIme1:=prIce1>Ref(HHV(prIce1,pds),-1);
tIme2:=prIce2[{restrIct to Iast events}]
tIme1:=tIme1
AND Cum(tIme1)=LastVaIue(Cum(tIme1));
tIme2:=tIme2
AND Cum(tIme2)=LastVaIue(Cum(tIme2));
{sort events}
t1pds:=LastVaIue(BarsSInce(tIme1));
t2pds:=LastVaIue(BarsSInce(tIme2));
x1:=If(t1pds>=t2pds,tIme1,tIme2);
x2:=If(t1pds>=t2pds,tIme2,tIme1);
y1:=If(t1pds>=t2pds,prIce1,prIce2);
y2:=If(t1pds>=t2pds,prIce2,prIce1);
{fIx coordInates}
y1:=VaIueWhen(1,x1,y1);
y2:=LastVaIue(VaIueWhen(1,x2,y2));
b1:=LastVaIue(BarsSInce(x1));
b2:=LastVaIue(BarsSInce(x2));
pIot:=y1+BarsSInce(x1)*(y2-y1)/(b1-b2);
If(dIspIay=1,pIot,tIme1+tIme2)
(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-T.html 2014-10-14 14:05:43
Wyszukiwarka
Podobne podstrony:
Metastock Formulas D 1
Metastock Formulas L
Metastock Formulas K
Metastock Formulas O
Metastock Formulas F
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
Metastock Formulas P
więcej podobnych podstron