Hi Chorlton
Try this below. I misread "l" as "1". It works when
the variable names are changed to use the letter rather than the number. Sorry
about that. You checked the right things but the mistake is difficult to spot
visually. This is one of those times when you have to believe that MS is right
and just dig a little deeper.
{ColA} Ml:=FmlVar("Short&MediumIndicators","ml"); Sl:=Fml("Short&MediumIndicators"); MA:=Mov(C,50,S); Ml>Ref(Ml,-1)
AND Sl>Ref(Sl,-1) AND MA>Ref(MA,-1);
{Filter}
colA
Regards
Roy
----- Original Message -----
Sent: Monday, October 24, 2005 9:24 PM
Subject: Re: [EquisMetaStock Group] Help writing an
Exploration
Hi Roy,
Thanks for the quick response. However, i
cannot get this to work! :-( I have added the following code to
the filter as you
said:
M1:=FmlVar("Short&MediumIndicators","m1"); S1:=Fml("Short&MediumIndicators"); MA:=Mov(C,50,S); M1>Ref(M1,-1)
AND S1>Ref(S1,-1) AND MA>Ref(MA,-1);
Short&MediumIndicators
is the name of the indicator which I have in my layout (window 1 - see
original email)
The error message I am getting is:
This variable
does not exist in the specified formula
I have checked the spelling
of the indicator and the rest of the code & everything seems ok. Any
Ideas?
Many Thanks,
Chorlton
--- In
equismetastock@xxxxxxxxxxxxxxx, "Roy Larsen" <rlarsen@xxxx>
wrote: > > 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 > www.metastocktips.co.nz > > > -----
Original Message ----- > From: chorlton_c_hardy > To:
equismetastock@xxxxxxxxxxxxxxx > 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 > > a.. Visit your group
"equismetastock" on the web. >
> b.. To unsubscribe from this group, send an email
to: >
equismetastock-unsubscribe@xxxxxxxxxxxxxxx >
> c.. Your use of Yahoo! Groups is subject to the
Yahoo! Terms of Service. > > >
------------------------------------------------------------------- ------------- >
SPONSORED LINKS
YAHOO! GROUPS LINKS
|