Experts & Indicators for Metastock


Experts - Explorers & Indicators

Experts for Metastock

Gann Swing Expert
By Adam Hefner

Instructions

Note: For this Expert to you work you must also create the indicators outlined in the metastock indicator's section, namely the Gann-Trend and Gann-Swing by Adam Hefner

1. First create a new expert and name it whatever you want.

2a. under "trends" tab put this code for bullish:

ut:=FmlVar("GANN-Trend","TDV");
uplot:=If(BarsSince(Ut=1)<
BarsSince(Ut=-1),1,0);
uplot=1;

2b. and this for bearish:

dt:=FmlVar("GANN-Trend","TDV");
dplot:=If(BarsSince(dt=1)>
BarsSince(dt=-1),1,0);
dplot=1;

Then click on the "ribbon" option and turn off "Display Vertical Lines", I also turn off the corner option.

3a. Under highlights tab create a new and call it "HiLo Change", choose color, and enter this code:

HLd:=If(CLOSE>Ref(Mov(H,3,S),-1),
{then}1,
{else}If(CLOSE<Ref(Mov(L,3,S),
-1),
{then}-1,
{else}0));
HLv:=ValueWhen(1,HLd<>0,HLd);
HLv<>Ref(HLv,-1);

3b. Create new and call it "Up-Trend", choose color, and enter this code:

ut:=FmlVar("GANN-Trend","TDV");
uplot:=If(BarsSince(Ut=1)<
BarsSince(Ut=-1),1,0);
uplot=1;

3c. Create new and call it "Down-Trend", choose color, and enter this code:

dt:=FmlVar("GANN-Trend","TDV");
dplot:=If(BarsSince(dt=1)>
BarsSince(dt=-1),1,0);
dplot=1;

4a. Under "Symbols" tab create new and call it " UpSwing", enter this code:

FmlVar("GANN-Swing","SD2")=1;

then under graphic choose "Buy Arrow", choose color (Dark Green), and small size, then pick "Above Price Plot".

4b. Create new and call it "DownSwing", enter this code:

FmlVar("GANN-Swing","SD2")=-1;

then under graphic choose "sell arrow", choose color (Dark Red), and small size, then pick "Below Price Plot".

As for the HiLo ....just plot it as a regular indicator and choose the last "style" option under "color/style" tab.

Back to top

0x01 graphic


Long Term Up Trend with Short term re-entery Signals
By Hitendra Vasudeo - www.stockmechanics.com

Instuctions:
Create New Expert Advisor : Long term Up Trend.

Click On Trend. In the Bullish blank section copy:
CLOSE > Mov(CLOSE ,200 ,E ) AND Mov(CLOSE ,200 ,E ) >Mov(CLOSE ,200 ,S )

In the bearish blank section copy:
CLOSE < Mov(CLOSE ,200 ,E ) AND Mov(CLOSE ,200 ,E ) <Mov(CLOSE ,200 ,S )

Click on Ribbons
Tick mark Display Ribbon in Chart
Tick mark Display Vertical Lines

Click Ok and come on the the section of Symbols

In symbols create two entry
1) BUY
2) EXIT or SELL

Under Buy
Copy Paste the following:
(CLOSE < Mov(CLOSE ,200 ,E ) AND Mov(CLOSE ,200 ,E ) <Mov(CLOSE ,200 ,S ) AND ( Cross( Mov(CLOSE ,8 ,S ) , Mov(CLOSE , 2,E ) ))) OR ( Cross( Mov(CLOSE ,200,E ),CLOSE ) AND (CLOSE < Mov(CLOSE ,200 ,E ) AND Mov(CLOSE ,200 ,E ) < Mov(CLOSE ,200 ,S )))

In the graphic mode select suitable symbol.
Click Ok

Under Exit or Sell
Copy Paste

Cross( Mov(CLOSE ,200 ,E ) ,CLOSE ) OR Cross( Mov(CLOSE ,200 ,S ) ,CLOSE )

In the graphic mode select suitable symbol.

Buy when the Long term trend turn bullish and enter further on short term buy signals.

Exit long positions only when the Long term trend gives an Exit or SELL.

Back to top

0x01 graphic


Metastock Expert Commentary (Standard)
By Michael Arnoldi

Copy this metastock formula into commentary section
of Metastock Expert Advisor.

Review of : <symbol>
as of <date>
TODAY'S CLOSE WriteVal(CLOSE,2.3)
TOMORROW's
PROJECTED HIGH
WriteIf(C<O, "WRITEVAL(-L+ (H+2*L+C)/2,25.2)")
WriteIf(C>O, "WRITEVAL(-L+ (2*H+L+C)/2,25.2)")
WriteIf(C=O, "WRITEVAL(-L+ (H+L+2*C)/2,25.2)")
PROJECTED LOW
WriteIf(C<O, "WRITEVAL(-H+ (H+2*L+C)/2,25.2)")
WriteIf(C>O, "WRITEVAL(-H+ (2*H+L+C)/2,25.2)")
WriteIf(C=O, "WRITEVAL(-H+ (H+L+2*C)/2,25.2)")

BOLLINGER BANDS
CLOSING PRICE:WRITEVAL(C,2.3)
BOLLINGERBAND TOP:
WRITEVAL( BBandTop(C,21,E,2),13.3)
21 DAY MOVING AVERAGE:
WRITEVAL(MOV(C,21,E),13.3)
BOLLINGERBAND BOTTOM:
WRITEVAL( BBandBOT(C,21,E,2),13.3)

Explorers for Metastock

Bottom Reversal - Metastock Formula

These are a collection of bottom signals.
The search returns 1 for Ok and 0 for not ok.

Col A: CLOSE
Col B: EngulfingBull()
Col C: MorningDojiStar()
Col D: MorningStar()
Col E: 3WhiteSoldiers()

Back to top

0x01 graphic


Close Above Median Price - Metastock Formula
by The Strategic Electronic Day Trader.

This exploration is designed to find those stocks where the close is above the median price over the past five days. It matches the steps in Dels book "The Strategic Electronic Day Trader".

Col A: CLOSE - MP()
Col B: (Ref(CLOSE,-1))-(Ref( MP() ,-1))
Col C: (Ref(CLOSE,-2))-(Ref( MP() ,-2))
Col D: (Ref(CLOSE,-3))-(Ref( MP() ,-3))
Col E: (Ref(CLOSE,-4))-(Ref( MP() ,-4))

Filter: colA>=0 AND colB>=0 AND colC>=0 AND colD>=0 AND colE>=0

The filter in the exploration only shows those stocks that have the strongest bullish bias over all 5 days. By removing the filter all stocks will be shown. Ranking the first column will then allow you to establish the overall score for each stock.

Back to top

0x01 graphic

Higher Closes - Metastock Formula

Shows stocks which have closed higher on successive days.

Col A: CLOSE
Col A: CLOSE -1
Col A: CLOSE -2

Filter: When(colA,>,colB) AND When(colB,>,colC)

Back to top

0x01 graphic

High Volume - Metastock Formula

Displays those where volume is above the 100 day moving average.
The search returns 1 for Ok and 0 for not ok.

Col A: VOLUME
Col A: Mov(VOLUME,100,EXPONENTIAL)
Col A: ((VOLUME - Mov(VOLUME,100,EXPONENTIAL)) / Mov(VOLUME,100,EXPONENTIAL)) * 100

Filter: When(colA,>,colB)

Back to top

0x01 graphic


Equis' Price & Volume - Metastock Formula 0x01 graphic

By Equis International Metastock Explorers

Col A: Close CLOSE
Col B: Previous Ref(CLOSE,-1)
Col C: % change ROC(CLOSE,1,percent)
Col D: Volume VOLUME
Col E: M.A. Mov(VOLUME,50,EXPONENTIAL)
Col F: % above ((VOLUME - Mov(VOLUME,50,EXPONENTIAL)) /
Mov(VOLUME,50,EXPONENTIAL)) * 100

Filter colC >= 5 AND colD >= colE*1.5

Back to top

0x01 graphic


Long Term Up Trend with Short Term Re-Entry Signals
By Hitendra Vasudeo - www.stockmechanics.com

TO BUY

(CLOSE < Mov(CLOSE ,200 ,E ) AND Mov(CLOSE ,200 ,E ) <Mov(CLOSE ,200 ,S ) AND ( Cross( Mov(CLOSE ,8 ,S ) , Mov(CLOSE , 2,E ) ))) OR ( Cross( Mov(CLOSE ,200,E ),CLOSE ) AND (CLOSE < Mov(CLOSE ,200 ,E ) AND Mov(CLOSE ,200 ,E ) < Mov(CLOSE ,200 ,S )))

EXIT

Cross( Mov(CLOSE ,200 ,E ) ,CLOSE ) OR
Cross( Mov(CLOSE ,200 ,S ) ,CLOSE )

0x01 graphic



MACD Crossover Buy Signal - Metastock Formula

Shows those stocks where an MACD crossover has been signalled.The search returns 1 for Ok and 0 for not ok.

Col A: CLOSE
Col B: MACD()
Col C: Ref(MACD(),-1)
Col D: Mov(MACD(),9,EXPONENTIAL)
Col E: Ref(Mov(MACD(),9,EXPONENTIAL),-1)
Col F: ((MACD() - Mov(MACD(),9,EXPONENTIAL)) /Mov(MACD(),9,EXPONENTIAL)) * 100

Filter: Cross( MACD(), Mov(MACD(),9,EXPONENTIAL))

Back to top

0x01 graphic


Stocks Closing Above 60 Day High - Metastock Formula
By Rajat Bose 0x01 graphic

To find the securities that have closed above their high today (the last
trading day in the database) for the first time, I have written this
MetaStock Explorer.

ColA: {Close) C
ColB: {Previous 60-day High} Ref(HHV(H,60), -1)
ColC: {Current 60-day High} HHV(H,60)
ColD: {Volume} V
Filter: (colA>colB) AND (Ref(C,-1)<Ref(HHV(H,60), -1)) AND
(H=HHV(H,60))

This formula does two things:

1) It lists only those securities which have met the required conditions
only on the last trading day.
2) The new 60-day high must have taken place only on the last trading day.

Back to top

0x01 graphic


Moving Average Crossover - Bullish - Metastock Formula

This is a10 and 30 day moving average crossover search. Results close to 0 pinpoint the crossover.

Col A: CLOSE
Col A: Mov(CLOSE,30,EXPONENTIAL)
Col A: ((CLOSE-Mov(CLOSE,30,EXPONENTIAL)) /Mov(CLOSE,30,EXPONENTIAL)) * 100
Col A: ((CLOSE-Mov(CLOSE,10,EXPONENTIAL)) /Mov(CLOSE,10,EXPONENTIAL)) * 100

Filter: When(colA > colB)

Back to top

0x01 graphic


RSC Exploration Coding - Metastock Formula 0x01 graphic

by MetaStock Programming Study Guide

Click here to download Sector Analysis explanation notes.

Col A: % MA RSC ROC(Mov((C/P),13,S),1,%)

Back to top

0x01 graphic


Turtle's Traders Entry System - Metastock Formula 0x01 graphic

by MetaStock Programming Study Guide

Col A: Close: C
Col B: Previous: Ref(C,-1)
Col C: ROC: ROC(C,1,%)
Col D: Avg T/O: Mov(C,21,S)*Mov(V,21,S)

Filter: H>=Ref(H,-1) AND H>=Ref(H,-2) AND H>=Ref(H,-3)
AND H>=Ref(H,-4) AND Mov(C,13,E)>
Ref(Mov(C,13,E),-1) AND
Trough(1,L,4)>Trough(2,L,4)AND C>Mov(C,180,E) AND
O>Ref(C,-1) AND L > Ref(H,-5)

Formulas Metastock

ADX Raw0x01 graphic

Bang For The Buck 0x01 graphic

Coppock Indicator 0x01 graphic

Darvis Box - Based on "How I made 2 million on the stockmarket"
Dr Elder's Force Index

Elliot Wave Identification
Fibonacci Trader- Fixed Balance Point- REVISED
Fibonacci Trader- Dynamic Balance Point
Gann High Low

Gann-Swing
Gann-Trend
Guppy MMA Oscillator 0x01 graphic

Highest High
MACD Histogram
MA oscillator, Sine-weighted 0x01 graphic

Metastock Automatic Trendline Formula   0x01 graphic

Modified Williams %R Metastock Indicator
Psychology Index 0x01 graphic

Slope of a Linear Regression Line
Stochastic Momentum Indicator0x01 graphic

Resistence & Support
Trailing Stoploss ATR - Long 0x01 graphic

True Strength Index
Zero Lag EMA
Zero Lag MACD
 

0x01 graphic


ADX Raw - Metastock Indicator Formula 0x01 graphic

By Equis International Metastock Indicators
and published in the Oct99 TASC

Periods:= Input("Enter time periods",1,100,14);

PlusDM:= If(HIGH>Ref(HIGH,-1) AND
LOW>=Ref(LOW,-1), HIGH-Ref(HIGH,-1),
If(HIGH>Ref(HIGH,-1) AND LOW<Ref(LOW,-1)
AND HIGH-Ref(HIGH,-1)>Ref(LOW,-1)-LOW,
HIGH-Ref(HIGH,-1), 0));
DIPlus:= 100 * Wilders(PlusDM,Periods) /
ATR(Periods);

MinusDM:= If(LOW<Ref(LOW,-1) AND
HIGH<=Ref(HIGH,-1), Ref(LOW,-1)-LOW,
If(HIGH>Ref(HIGH,-1) AND LOW<Ref(LOW,-1)
AND HIGH-Ref(HIGH,-1)<Ref(LOW,-1)-LOW,
Ref(LOW,-1)-LOW, 0));
DIMinus:= 100 * Wilders(MinusDM,Periods) /
ATR(Periods);

DIDif:= Abs(DIPlus - DIMinus);
DISum:= DIPlus + DIMinus;
ADXRaw:= 100 * Wilders(DIDif/DISum, Periods);

ADXRaw

Back to top

0x01 graphic


Bang For The Buck - Metastock Indicator Formula 0x01 graphic

by MetaStock Programming Study Guide

This indicator shows the possible dollar return (on a $10,000 account)
for a security on any given period. This is calculated by dividing a
$10,000 account by the closing price. This number is then multiplied by
the average range of the security for the last 200 periods. The
interpretation is such that the higher the value, the higher the profit
potential.

((10000/C)* (Mov(ATR(1),200,S))/100)

Back to top

0x01 graphic


Coppock Indicator - Metastock Indicator Formula 0x01 graphic

by MetaStock Programming Study Guide

The Coppock Indicator was developed by Edwin Coppock, a US
investment advisor. It is a momentum oscillator that was designed for
long term investors to begin accumulation at the beginning of a bull
market. The Coppock Indicator signals the beginning of a bull market
when it crosses above the zero line. This signal is usually after the first
leg of a bull market is underway, thus it's highly reliable.

Mov(ROC(C,14,%)+ROC(C,11,%),10,W);0

Back to top

0x01 graphic

Darvis Box - Based on "How I made 2 million on the stockmarket"
Jason Prestwidge

Periods:=Input("periods",1,260,260);

Topbox:=If(Ref(H,-3)>=Ref(HHV(H,Periods),-4) AND Ref(H,-2)<
Ref(H,- 3) AND Ref(H,-1)<Ref(H,-3) AND H< Ref(H,-3),
Ref(H,-3),PREVIOUS);

Botbox:=If(Ref(H,-3)>=Ref(HHV(H,Periods),-4) AND Ref(H,-2)
<Ref(H,-3) AND Ref(H,-1)<Ref(H,-3) AND H<
Ref(H,-3),LLV(L,4),PREVIOUS);

Topbox;
Botbox;

Back to top

0x01 graphic


Dr Elder's Force Index - Metastock Indicator Formula
by MetaStock Programming Study Guide

FI:=(C-Ref(C,-1))*V;Mov(FI,13,E)
{Smoothed by 13 period exponential moving average}

{Dr Elder also refers to a 2 period Force Index in which case, you
would change the `13' above to `2'.}

(The following explanatory notes are taken from `Trading for a Living'
by Dr. Alexander Elder, Published by John Wiley & Sons, Inc, 1993)

{“Force Index is an oscillator developed by this author. It measures
the force of bulls behind every rally and of bears behind every decline.

Force Index combines three essential pieces of market information -
the direction of price change, its extent, and trading volume.
It provides a new, practical way of using volume to make trading
decisions.

Force Index can be used raw, but it works better if you smooth it
with a moving average. Force Index smoothed with a short MA
helps pinpoint entry and exit points. Force Index smoothed with
a long MA reveals major changes in the force of bulls and bears.

A 2-day EMA of Force Index provides a minimal degree of smoothing.
It is useful for finding entry points into the markets. It pays to buy
when the 2-day EMA is negative and sell when it is positive, as long
as you trade in the direction of the 13-day EMA of prices.

A 13-day EMA of Force Index tracks longer term changes in the force
of bulls and bears. When it crosses above its centerline, it shows the
bulls are in control. When it turns negative, it shows that bears are in
control. Divergences between 13-day EMA of Force Index and prices
identify important turning points.”}

Back to top

0x01 graphic


Elliot Wave Identification - Metastock Indicator Formula
by Kevin Campbell

As far as using MetaStock for identifying waves, use a 5/34 histogram
for finding wave 4, the end of wave 3 and for help with identifying
wave 1/2, which apparently Advanced Get uses extensively. You can
write MetaStock explorations/templates/experts, etc., with this
indicator; e.g., explorations to find the peaks and troughs of the
5/34 histogram.

The version of the indicator I use in MetaStock v6.52 is:

Mov(OscP(5,34,E,$),5,S)

-150 days minimum of data.

The peaks of the histogram help identify waves 1, 3 and 5 and troughs
for waves 2 and 4. Use MetaStock line studies (both trendlines,
channels and fib retracements) for additional wave
identification/analysis. Of course, you can label the waves with the
text box.

Back to top

0x01 graphic

Fibonacci Trader- Fixed Balance Point
- Metastock Indicator Formula
by Adam Hefner

Mc1:=BarsSince(DayOfWeek()=1);
Fc1:=BarsSince(DayOfWeek()=5);
Fc2:=Ref(BarsSince(DayOfWeek()=5),-1)-1;
{Fixed Balance Point Calculation}
FBC:=If(Mc1=0 AND Fc1>2,
{then}(Ref(HHV(H,LastValue(mc1)),-1)+
Ref(LLV(L,LastValue(Mc1)),-1)+
Ref(C,-1))/3,
{else}If(Fc1=0 AND Mc1>5,
{then}(HHV(H,LastValue(Fc2))+
LLV(L,LastValue(Fc2))+C)/3,
{else}If(Fc1=0,
{then}(HHV(H,LastValue(Mc1))+
LLV(L,LastValue(Mc1))+C)/3,
{else}0)));
{Fixed Balance Point Plot}
FBP:=ValueWhen(1,FBC>0,FBC);
FBP;

Back to top

0x01 graphic

Fibonacci Trader- Dynamic Balance Point
- Metastock Indicator Formula
by Adam Hefner

dt:=DayOfWeek();
DBC:=(HighestSince(5,DayOfWeek()=dt,H)+
LowestSince(5,DayOfWeek()=dt,L)+CLOSE)/3;
DBC

Back to top

0x01 graphic


Gann High Low - Metastock Indicator Formula
by Adam Hefner

{name: GANN-HiLo}

HLd:=If(CLOSE>Ref(Mov(H,3,S),-1),
{then}1,
{else}If(CLOSE<Ref(Mov(L,3,S),-1),
{then}-1,
{else}0));
HLv:=ValueWhen(1,HLd<>0,HLd);
HiLo:=If(HLv=-1,
{then}Mov(H,3,S),
{else}Mov(L,3,S));
HiLo;

Back to top

0x01 graphic

Gann-Swing - Metastock Indicator Formula
by Adam Hefner

{Market swing is defined as:
Up = 2 higher highs,
Down = 2 lower highs.}
Us:=BarsSince((H > Ref(H,-1)) AND (Ref(H,-1) >
Ref(H,-2)));
Ds:=BarsSince((L < Ref(L,-1)) AND (Ref(L,-1) <
Ref(L,-2)));
Sd1:=If(Us=0,
{then}If(Ref(L,-1)<>LowestSince(1,Ds=0,L),
{then}1,
{else}0),
{else}If(Ds=0,
{then}If(Ref(H,-1)<>
HighestSince(1,Us=0,H),
{then}-1,
{else}0),
{else}0));
Sd2:=If(Sd1=1,
{then} If(Ref(BarsSince(Sd1=1),-1) >
Ref(BarsSince(Sd1=-1),-1),
{then}1,
{else}0),
{else} If(Sd1=-1,
{then}If(Ref(BarsSince(Sd1=1),-1) <
Ref(BarsSince(Sd1=-1),-1),
{then}-1,
{else}0),
{else}0));
TD1:=ValueWhen(1,Sd2<>0,Sd2);
Td1;

Back to top

0x01 graphic

Gann-Trend - Metastock Indicator Formula
by Adam Hefner

{Swing Direction}
Sd:= FmlVar("GANN-Swing","TD1") ;
{Swing Change High}
Sch:=If(Sd=1 AND Ref(sd,-1)=-1,
{then}1,
{else}0);
{Swing Change Low}
Scl:=If(Sd=-1 AND Ref(Sd,-1)=1,
{then}1,
{else}0);
{Peak Value}
Pv:=If(Scl=1,
{then}HighestSince(1,Sch=1,H),
{else}0);
{Trough Value}
Tv:=If(Sch=1,
{then}LowestSince(1,Scl=1,L),
{else}0);
{Trend Direction}
Td:=If(H>ValueWhen(1,Pv>0,Pv),
{then}1,
{else}If(L<ValueWhen(1,Tv>0,Tv),
{then}-1,
{else}0));
{UpTrend=1 DownTrend =-1}
Tdv:=ValueWhen(1,Td<>0,Td);
Tdv;

Back to top

0x01 graphic


Guppy MMA Oscillator - Metastock Indicator Formula 0x01 graphic

by Leon Wilson

Indicator Name:- GMMACD $

Trigger:=Input("Trigger Line",1,55,21);

SHORT:=(Mov(CLOSE,3,E)+Mov(CLOSE,5,E)+
Mov(CLOSE,8,E)+Mov(CLOSE,10,E)+
Mov(CLOSE,12,E)+Mov(CLOSE,15,E));
LONG:=(Mov(CLOSE,30,E)+Mov(CLOSE,35,E)+
Mov(CLOSE,40,E)+Mov(CLOSE,45,E)+
Mov(CLOSE,50,E)+Mov(CLOSE,60,E));

Short-Long;
Mov(Short-Long,Trigger,E);
0;

Indicator Name:- GMMACD %

Trigger:=Input("Trigger Line",1,55,21);


SHORT:=(Mov(CLOSE,3,E)+Mov(CLOSE,5,E)+
Mov(CLOSE,8,E)+Mov(CLOSE,10,E)+
Mov(CLOSE,12,E)+Mov(CLOSE,15,E));
LONG:=(Mov(CLOSE,30,E)+Mov(CLOSE,35,E)+
Mov(CLOSE,40,E)+Mov(CLOSE,45,E)+
Mov(CLOSE,50,E)+Mov(CLOSE,60,E));

((Short-Long)/Long)*100;
Mov(((Short-Long)/Long)*100,Trigger,E);
0;

Back to top

0x01 graphic

Highest High - Metastock Indicator Formula
By MetaStock Programming Study Guide

periods := Input("Enter the number of periods for the highest
high", 1, 9999, 120) ; C>Ref(HHV(C, periods ),-1)

Back to top

0x01 graphic


MACD Histogram - Metastock Indicator Formula
By MetaStock Programming Study Guide

MACD()-Mov(MACD(),9,E);0

Back to top

0x01 graphic



MA oscillator, Sine-weighted
By Jose Silva

{ Normalized, lag-less, Sine-weighted
Mov Avg & MA Oscillator v1.0 }
{ Divergence signals between SWMA & Oscillator:
+1=Long, -1=Short }
{ ©Copyright 2004 Jose Silva }
{ http://users.bigpond.com/prominex/pegasus.htm }

plot:=Input("[1]-SWMA Osc, [2]-SW Mov Avg,
[3]-Divergences",1,3,1);
pds:=Input("normalizing periods (1=none)",
1,2520,252);

SD:=30 {180/12};
S1:=Sin(1*SD)*C;
S2:=Sin(2*SD)*Ref(C,-1);
S3:=Sin(3*SD)*Ref(C,-2);
S4:=Sin(4*SD)*Ref(C,-3);
S5:=Sin(5*SD)*Ref(C,-4);
S6:=Sin(6*SD)*Ref(C,-5);
S7:=Sin(7*SD)*Ref(C,-6);
S8:=Sin(8*SD)*Ref(C,-7);
S9:=Sin(9*SD)*Ref(C,-8);
S10:=Sin(10*SD)*Ref(C,-9);
S11:=Sin(11*SD)*Ref(C,-10);

den:=
Sin(SD)+Sin(2*SD)+Sin(3*SD)+Sin(4*SD)+Sin(5*SD);
SWMA:=(S1+S2+S3+S4+S5)/den;
den:=Sin(SD)+Sin(2*SD)+Sin(3*SD)+Sin(4*SD)
+Sin(5*SD)+Sin(6*SD)+Sin(7*SD)+Sin(8*SD)
+Sin(9*SD)+Sin(10*SD)+Sin(11*SD);
SWosc:=(S1+S2+S3+S4+S5+S6+S7+S8+S9+S10+S11)/den;
SWoscNorm:=(SWosc-LLV(SWosc,pds))
/(HHV(SWosc,pds)-LLV(SWosc,pds)+.000001)*100;
SWoscNorm:=If(pds<2,SWosc,SWoscNorm);
up:=SWoscNorm>Ref(SWoscNorm,-1)
AND SWMA<Ref(SWMA,-1);
dw:=SWoscNorm<Ref(SWoscNorm,-1)
AND SWMA>Ref(SWMA,-1);

If(plot=1,SWoscNorm,If(plot=2,SWMA,up+-dw))

Back to top

0x01 graphic

Metastock Automatic Trendline Formula -
Metastock Indicator Formula 0x01 graphic

Mike Helmacy www.techanalysis.com

This formula will draw a trendline from the most recent bottom.
The L (low) can be changed to C (close) and the 10 can be
changed to a different percent value. You will also need to change
the line style to the last one in the drop down list.

Trough(1,L,10)+ ((((Trough(1,L,10) - Trough(2,L,10)) /
(TroughBars(2,L,10)-TroughBars(1,L,10))) *
TroughBars(1,L,10)))

Back to top

0x01 graphic


Modified Williams %R Metastock Indicator -
Metastock Indicator Formula
by Rajat Bose

{All I have done here is to substitute High and Low of any bar with
that of Bollinger Band Top and Bollinger Band Bottom. I have tested
it on various time periods (for Bollinger Bands) using 2 standard
deviations. It sometimes gives an early indication of reversals than
the Williams %R of the same period. Divergences have also been
somewhat better. However, the structure shows that most of its
properties are similar to those of the Williams %R or, for that matter
, of any other overbought-oversold indicator.}

Periods := Input("Time Period", 3,50,5);
NumDev := Input("No. of Standard Deviations", 1,5,2);

(100*(C-BBandBot(C, Periods, S, NumDev))/((( BBandTop(C,
Periods, S, NumDev))-(BBandBot(C, Periods, S, NumDev)))))


Back to top

0x01 graphic

Psychology Index -
Metastock Indicator Formula 0x01 graphic

by Glenn Wallace
- Futures Magazine, Vol.29 No.6, June 2000, P.48

There was an overbought/oversold indicator described in the June
2000 Futures Magazine called the Psychological Index. It looked sort
of interesting, so I wrote the MetaStock code for it:

LookBack:= Input("Number of lookback periods", 2, 100, 12);
UThreshold:= Input("Upper threshold (%)", 0, 100, 75);
LThreshold:= Input("Lower threshold (%)", 0, 100, 25);
UpDay:= If(CLOSE > Ref(CLOSE,-1), 1, 0);
PsychIndex:= Sum(UpDay,LookBack) / LookBack * 100;
PsychIndex; UThreshold; LThreshold

Back to top

0x01 graphic

Resistance and Support - Metastock Indicator Formula

LookBack := Input("Look Back Periods",1,1000,10);
Resistance :=ValueWhen(1,Cross(Mov(C, LookBack,
S),C),HHV(H, LookBack));
Support :=ValueWhen(1,Cross(C,Mov(C, LookBack,
S)),LLV(L, LookBack));
Resistance;
Support;

Back to top

0x01 graphic

Slope of a Linear Regression Line - Metastock Indicator Formula

The following custom formula will return the slope 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))

Back to top

0x01 graphic

Stochastic Momentum Indicator - Metastock Indicator Formula
January 1993 issue of Stocks & Commodities magazine 0x01 graphic

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)))

Back to top

0x01 graphic

Trailing Stoploss ATR - Long - Metastock Indicator Formula
By MetaStock Programming Study Guide 0x01 graphic


This ATR based indicator is ideal for existing long trades. When
plotted on a chart we will be prompted for the trade entry date
and the multiple of ATR we wish to use as the trailing exit.

PDay := Input("Day of Month" ,1,31,1);
PMonth := Input("Month" ,1,12,1);
PYear := Input("Year",2000,2010,2002);
PATR := Input("Multiple of ATR",1,10,2);
TSE1 := BarsSince(DayOfMonth() = PDay AND Month() = PMonth
AND Year() = PYear);
TSE2 := HighestSince(1,TSE1=0,H ) ;
TSE3 := TSE2 - PATR*ATR(15);

HighestSince(1 ,TSE1 = 1 ,TSE3 )

Back to top

0x01 graphic

True Strength Index - Metastock Indicator Formula
January 1993 issue of Technical Analysis of Stocks and Commodities.

100 * ( Mov( Mov( ROC(C,1,$),25,E),13,E) / Mov( Mov(
Abs( ROC(C,1,$)),25,E),13,E))

Back to top

0x01 graphic


Zero Lag EMA - Metastock Indicator Formula
by Peter Martin alakazam@bigpond.com

Here's my Metastock 6.2 coded version of the Zero Lag Moving
Average, as described in the April, 2000, issue of
Technical Analysis of Stocks and Commodities. I've also used
it to construct a Zero Lag MACD and a Zero Lag MACD trigger
signal.

Period:= Input("What Period",1,250,10);
EMA1:= Mov(CLOSE,Period,E);
EMA2:= Mov(EMA1,Period,E);
Difference:= EMA1 - EMA2;
ZeroLagEMA:= EMA1 + Difference;
ZeroLagEMA

Back to top

0x01 graphic

Zero Lag MACD - Metastock Indicator Formula
by Peter Martin alakazam@bigpond.com

EMA1:= Mov(CLOSE,13,E);
EMA2:= Mov(EMA1,13,E);
Difference:= EMA1 - EMA2;
ZeroLagEMA13:= EMA1 + Difference;
EMA1:= Mov(CLOSE,21,E);
EMA2:= Mov(EMA1,21,E);
Difference:= EMA1 - EMA2;
ZeroLagEMA21:= EMA1 + Difference;
ZeroLagMACD:=ZeroLagEMA13 - ZeroLagEMA21;
ZeroLagMACD

RSI and Moving Averages

{place in filter section}

C>MOV(C,5,E) AND C>MOV(C,200,E) AND CROSS(RSI(14),30)

(Go Top)

RSI Divergence

{RSI(9) DIVERGENCE BUY:}
If(RSI(9) >= HHV(RSI(9),19) AND CLOSE <HHV(CLOSE,19), 1,0) OR
If(CLOSE <= LLV(CLOSE,19) AND RSI(9) > LLV(RSI(9),19), 1,0)

{RSI(9) DIVERGENCE SELL:}
If(CLOSE >= HHV(CLOSE,19) AND RSI(9)<HHV(RSI(9),19),1,0) OR
If(RSI(9) <= LLV(RSI(9),19) AND CLOSE > LLV(CLOSE,19),1,0)

{You can substitute any formula for the "RSI(9)"}

(Go Top)

RSI Divergence Exploration

{A simple exploration filter formula for finding a bullish divergence
between the RSI and the price is shown below. To find a bearish divergence,
replace > with <. The differences in the trough function was found through
an optimization routine and they may not be the best values for your
application.}

Ref(RSI(14),-1)>Trough(1,RSI(14),.8)
AND
Ref(CLOSE,-1)<Trough(1,CLOSE,.2)

(Go Top)

RSI Offset

RSI(13) - 50 {offset the RSI to +-50}

(Go Top)

Ruggerio's Trend

Ruggiero's rules for trend mode quoting his table 4.9:

1. If ADX crosses above 25, then the market is trending.
2. If ADX crosses below 20, then the market is consolidating.
3. If ADX crosses below 45 from above, then the market is consolidating.
4. If ADX rises from below 10 on 3 out of 4 days, then the market will start
to trend.
5. If a trend is based on rule 4, it remains in effect until the 5 day
difference in ADX is less than 0.

Ruggiero employs a 14 day ADX but that is based on T-Bonds data. He suggests employing the above rules as a filter. I make the indicator take the value +1 if trending, a -1 if consolidating according to the above criteria but I guess the zero is for the grey area
in between. Anyway according to definition: If a market is not trending it must be consolidating. However the zero may contain additional useful information. Ruggiero suggests tweaking the threshold values.

periods:=Input("Periods?",1,63,14);
If((ADX(periods)>25 AND (BarsSince(Cross(45,ADX(periods))) >
BarsSince(Cross(ADX(periods),25)))) OR (ADX(periods) > 10 AND
Ref(ADX(periods),-4)<10 AND (ADX(periods)-Ref(ADX(periods),-5)>0)), 1,
If(ADX(periods)<20 OR ((BarsSince(Cross(45,ADX(periods))) <
BarsSince(Cross(ADX(periods),25))) AND ADX(periods) < 45),-1,0))



Wyszukiwarka

Podobne podstrony:
Darvas Box Formula for METASTOCK
Free Metastock Indicators Formula
Figures for chapter 5
Figures for chapter 12
GbpUsd analysis for July 06 Part 1
Figures for chapter 6
The American Society for the Prevention of Cruelty
AME Stds for NATO Seminar
Herbs for Sports Performance, Energy and Recovery Guide to Optimal Sports Nutrition
Japanese for busy people I (ch26 end)
Biomass Fired Superheater for more Efficient Electr Generation From WasteIncinerationPlants025bm 422
Microactuator for Precise Head Positioning
NLP for Beginners An Idiot Proof Guide to Neuro Linguistic Programming
Materiały nieżelazne Tworzywa sztuczne Przetwórstwo Auto Expert
Metastock Formule X Trading System fixed
Forex Online Manual For Successful Trading
English for CE materials id 161873
baker Is Head Movement Still Needed for Noun Incorporation

więcej podobnych podstron