PureBytes Links
Trading Reference Links
|
John,
Did you want the last line to be
Ref(Mov(C,30,E),-2) < Ref(Mov(C,30,E),-3));
or
Ref(Mov(C,30,E),-2) > Ref(Mov(C,30,E),-3));
which matches the rest of your code?
One of the problems I see is the use of and/or arguments. placing
them together will result in problems since metastock doesn't know
what should be "or" versus what should be "and". Easier to seperate
them as I have done below.
A:=Mov(C,30,E);
B:=Sum(A>Ref(A,-1),4)=1;
D:=(C>A) OR Cross(C,A);
B AND D
Also note that I have summed the reference of todays MA to
yesterdays and done it over the last 4 days. Controversial but it
will work. I am sure others will weigh in on this as it could still
be done differently.
Preston
--- In equismetastock@xxxxxxxxxxxxxxx, "johnnic1948" <johnnic@xxx>
wrote:
>
> Does anyone have any helpful suggestions?
>
> --- In equismetastock@xxxxxxxxxxxxxxx, "johnnic1948" <johnnic@>
> wrote:
> >
> > Would someone please be kind enough to confirm that the
following
> > simple code does what I want it to do?
> >
> > If the closing price crosses above the 30 week EMA or is already
> > above the EMA, and the EMA has turned upwards, then.....
> >
> > The code I have written is:
> >
> > (Cross(C,Mov(C,30,E)) OR C > Mov(C,30,E))
> >
> > AND
> > (Mov(C,30,E) > Ref(Mov(C,30,E),-1)
> >
> > AND
> > Ref(Mov(C,30,E),-1) > Ref(Mov(C,30,E),-2)
> >
> > AND
> > Ref(Mov(C,30,E),-2) < Ref(Mov(C,30,E),-3));
> >
> > Even if it is correct, is there a more elegant way of achieving
> the
> > same end?
> >
> > Thanks
> >
> > John
> >
>
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/equismetastock/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/equismetastock/join
(Yahoo! ID required)
<*> To change settings via email:
mailto:equismetastock-digest@xxxxxxxxxxxxxxx
mailto:equismetastock-fullfeatured@xxxxxxxxxxxxxxx
<*> To unsubscribe from this group, send an email to:
equismetastock-unsubscribe@xxxxxxxxxxxxxxx
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|