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 BUY
 
Under Sell
Copy Paste the following:
(CLOSE > Mov(CLOSE ,200 ,s ) AND ( Cross( Mov(CLOSE ,2 ,e ) , Mov(CLOSE , 8,s ) )))))  
 
 
In the graphic mode select suitable symbol.
Click Ok
 
Under Exit 
Copy Paste
 
(Cross( Mov(CLOSE ,200 ,E ) ,CLOSE ) OR Cross( Mov(CLOSE ,200 ,S ) ,CLOSE )) or ( (cross(mov(close,8,s),mov(close, 2,e) and close > Mov(CLOSE ,200 ,S ))
 
In the graphic mode select suitable symbol.
 
Sell  when the Long term trend turn Bearish  and enter short position further on short term sell signals.
 
Exit short positions only when the Long term trend gives an Exit or Buy.
 
 
 
In Symbols Create another two entry
 
3) Sell
 
4) Exit Sell
 
 
 
Under Sell
 
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))
 
 
 
In the graphic mode select suitable symbols
 
Click ok
 
Under Exit
 
Copy paste
 
(Cross(CLOSE, Mov(CLOSE ,200 ,E ) ) OR Cross(CLOSE, Mov(CLOSE ,200 ,S ) , )) or ( (cross(mov(close,2,e),mov(close, 8,s) and close < Mov(CLOSE ,200 ,S ))

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.