Metastock Expert Advisor Formulas
Click here to go back to Metastock Formula Index



Before you begin, if you haven't read the "The Search for the Holy Grail & the Perfect Indicator" click here and scroll halfway down the page to view it now.

Also, click here to discover the amazingly simple secret to master Metastock step-by-step.



Gann Swing Expert
Long Term Up Trend & Short Term Re-Entry Signals

Metastock Expert Commentary



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



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


Metastock Expert Commentary
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)

Back to top


If you have Metastock formulas you would like to share,
Please email to MetaStock Formula
We look forward to hearing from you!

To learn more about how to use Metastock and its formula click here.


copyright 2003 MetaStock Website Home
Metastock® is a registered trademark of Equis International.