[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [EquisMetaStock Group] Help writing an Exploration



PureBytes Links

Trading Reference Links

Hi Chorlton
 
 
Try this. I assume your oscillator formula has name so just put the name in where indicated in place of "your oscillator name".
 
{ColA}
M1:=FmlVar("your oscillator name","m1");
S1:=Fml("your oscillator name");
MA:=Mov(C,50,S);
M1>Ref(M1,-1) AND S1>Ref(S1,-1) AND MA>Ref(MA,-1);
 
{Filter}
colA
 
 
Or you could do it like this.
 
{Filter}
M1:=FmlVar("Your Oscillator name","m1");
S1:=Fml("Your Oscillator name");
MA:=Mov(C,50,S);
M1>Ref(M1,-1) AND S1>Ref(S1,-1) AND MA>Ref(MA,-1);
 
 
Regards
 
Roy
 
 
----- Original Message -----
Sent: Monday, October 24, 2005 11:32 AM
Subject: [EquisMetaStock Group] Help writing an Exploration

Hello All,

I currently have a layout in Metastock which contain 2 windows.

Window 1 contains a modified price oscillator (with 2 lines - a
short-term indicator & a medium-term indicator) and Window 2
contains Price data and a 50 day simple MA.

I would like to write an exploration that selects stocks where ALL 3
lines (the 2 in the price oscillator and the 50day MA) are all
moving in the SAME direction.

The formula "code" I currently have for the price oscillator is as
follows:

sp:=Input("Yellow Line (SL): Short MA (days)",1,50,3);

ip:=Input("Yellow Line (SL): Long MA (days)",5,100,10);

lp:=Input("Light Blue Line (ML): Oscillator MA  (days) ",5,100,16);

factor:= 2.43;

sl:= (Mov(CLOSE,sp,S)-Mov(CLOSE,ip,S))/(((((Mov(CLOSE,ip,S)
+factor*Mov(CLOSE,ip,S)
)*0.333)-Mov(CLOSE,ip,S))/100));
ml:= Mov(sl,lp,S);
ml;
sl;

The code for the MA is:

Pd1:=Input("Moving Average Period (days)",1,100,50);

MA:=Mov(CLOSE,Pd1,SIMPLE);

MA;


Can anyone offer any help on how I can write such an Exploration?


Many Thanks,

Chorlton








YAHOO! GROUPS LINKS