Hi Chorlton,
The revised code would be
M1:=Mov(HIGH,10,SIMPLE);
M2:=Mov(Low,8,SIMPLE);
Long=Sum(L>Max(M1,M2),2)=2;
Short:=Sum(H<Min(M1,M2),2)=2;
Long or Short
{Adding a minus sign in front of the word Short will allow
you to plot different visual signal
for long and short};
The only issue you may strike with this
setup is that in a prolonged trend you are going to get MANY signals.
As such you may want to filter some out
with a latch, or a really easy way that I some times use is to add the
following
Long:=Long and
Sum(Long,5)=1;
The 5 can be changed to what ever period
you like, and the resultant 1 can be as well.
The reverse for the short would be
Short:=Short and
Sum(Short,5)=1;
Have a play around with the code, and with
different parameters until you get the result you are looking for.
To add to an Expert, create a new Expert
Advisor, goto the Symbols tab, click on new, add in
the code
I would give a more detailed response for
the Expert advisor setup but I have to head off to work.
Regards,
Tim Hyder
-------------------------------------------------------
A successful man is one
who can build a firm
foundation with the
bricks that others throw at him.
David Brinkley
-------------------------------------------------------
From:
equismetastock@xxxxxxxxxxxxxxx [mailto:equismetastock@xxxxxxxxxxxxxxx] On Behalf Of chorlton_c_hardy
Sent: Thursday, 27 October 2005
06:05
To: equismetastock@xxxxxxxxxxxxxxx
Subject: Re: [EquisMetaStock
Group] Help with a New Exploration
Hi Tim,
Sorry if my original question doesn't make too
much sense. Its been
a long day :-/
Basically what I'm after is to search for stocks
which either have:
(i) 2 complete bars for the last 2 days above the
2 MA lines; or
(ii) 2 complete bars for the last 2 days below the
2 MA lines
My definition of a complete bar in the OPEN, HIGH,
LOW & CLOSE.
Not sure if this make any further sense, but will
definately try
your code Tim.
Thanks for the quick reply :-)
Can I ask how hard or easy would it be to write a
new Expert Advisor
which adds a BUY signal or a SELL signal to my
chart based on the
code you have kindly given me?
For the record my Metastock book is currently in
Storage and hence
why I'm posting on here.
Once again Many Thanks,
Chorlton
--- In equismetastock@xxxxxxxxxxxxxxx,
"Tim" <prez@xxxx> wrote:
>
> Hi Chorlton,
>
> M1:=Mov(HIGH,10,SIMPLE);
> M2:=Mov(Low,8,SIMPLE);
> Sum(L>M1 and L>M2,2)=2 and Sum(H<M1
and H<M2,2)=2;
>
> What you are asking for doesn't make sense as
the way it is worded
you are
> asking for the Low to be above the High
(which would actually make
the Lows
> the Highs).
>
> This code none the less should point you in
the right direction
for what you
> are wanting to achieve.
>
> Regards,
> Tim Hyder
> -------------------------------------------------------
> A successful man is one who can build a firm
> foundation with the bricks that others throw
at him.
>
> David Brinkley
>
-------------------------------------------------------
> _____
>
> From: equismetastock@xxxxxxxxxxxxxxx
[mailto:equismetastock@xxxxxxxxxxxxxxx]
> On Behalf Of chorlton_c_hardy
> Sent: Thursday, 27 October 2005 05:36
> To: equismetastock@xxxxxxxxxxxxxxx
> Subject: [EquisMetaStock Group] Help with a
New Exploration
>
> Hello Guys,
>
> Can someone help me with another exploration
that I'm trying to
> write.
>
> I currently have two basic moving averages,
the first one is a 10
> day MA based on the price HIGH and the second
is a 8 day MA based
on
> the price LOW.
>
> These simple MA's are:
Mov(HIGH,10,SIMPLE) & Mov(LOW,8,SIMPLE)
>
>
> I'd like to write an exploration that
identifies stocks where:
>
> 1) the price LOW's for the last 2 days is
ABOVE both of the MA
lines
>
> and,
>
> 2) the price HIGH's for the last 2 days is
BELOW both of the MA
lines
>
>
> Any Help appreciated,
>
> Thanks,
>
> Chorlton
>
>
>
>
>
>
>
> SPONSORED LINKS
>
> Business
> <http://groups.yahoo.com/gads?
t=ms&k=Business+finance+course&w1=Business+fin
>
ance+course&w2=Business+finance+class&w3=Small+business+finance&w4=Bu
siness+
>
finance+schools&w5=Business+finance+small+software&w6=Business+financ
e+onlin
>
e&c=6&s=181&.sig=v91cUHtNJxDhe_tDXxZ_cQ> finance course
> Business
> <http://groups.yahoo.com/gads?
t=ms&k=Business+finance+class&w1=Business+fina
>
nce+course&w2=Business+finance+class&w3=Small+business+finance&w4=Bus
iness+f
>
inance+schools&w5=Business+finance+small+software&w6=Business+finance
+online
>
&c=6&s=181&.sig=OgauKltJDEmbAvDHda24Mw> finance class
> Small
> <http://groups.yahoo.com/gads?
t=ms&k=Small+business+finance&w1=Business+fina
>
nce+course&w2=Business+finance+class&w3=Small+business+finance&w4=Bus
iness+f
>
inance+schools&w5=Business+finance+small+software&w6=Business+finance
+online
>
&c=6&s=181&.sig=hyI3gsCcX0UFmEODonLDaQ> business finance
>
> Business
> <http://groups.yahoo.com/gads?
t=ms&k=Business+finance+schools&w1=Business+fi
>
nance+course&w2=Business+finance+class&w3=Small+business+finance&w4=B
usiness
>
+finance+schools&w5=Business+finance+small+software&w6=Business+finan
ce+onli
>
ne&c=6&s=181&.sig=oL-lmfAz6WATlRjdM-jJPg> finance schools
> Business
> <http://groups.yahoo.com/gads?
t=ms&k=Business+finance+small+software&w1=Busi
>
ness+finance+course&w2=Business+finance+class&w3=Small+business+finan
ce&w4=B
>
usiness+finance+schools&w5=Business+finance+small+software&w6=Busines
s+finan
>
ce+online&c=6&s=181&.sig=ZGpsKvIVIE3zcPNNGuijdg> finance
small
software
> Business
> <http://groups.yahoo.com/gads?
t=ms&k=Business+finance+online&w1=Business+fin
>
ance+course&w2=Business+finance+class&w3=Small+business+finance&w4=Bu
siness+
>
finance+schools&w5=Business+finance+small+software&w6=Business+financ
e+onlin
> e&c=6&s=181&.sig=RF1r_9ejb0kAg3ujFLR3CQ>
finance online
>
> _____
>
> YAHOO! GROUPS LINKS
>
> * Visit your
group "equismetastock
> <http://groups.yahoo.com/group/equismetastock>
" on the web.
>
> * To
unsubscribe from this group, send an email to:
>
equismetastock-unsubscribe@xxxxxxxxxxxxxxx
>
<mailto:equismetastock-unsubscribe@xxxxxxxxxxxxxxx?
subject=Unsubscribe>
>
> * Your use of
Yahoo! Groups is subject to the Yahoo! Terms of
Service
> <http://docs.yahoo.com/info/terms/>
.
>
> _____
>
SPONSORED LINKS
YAHOO! GROUPS LINKS