PureBytes Links
Trading Reference Links
|
David,
You will not be able to use this in a system
tester, only to generate live signals, so I suggest you test this
thoroughly.
Substitute this line:
Num:= 0 - BC; {assuming BarsSince returns
non-negative number}
with
Num:= Lastvalue(Abs(BC));
DusantChief Architect<A
href="">http://www.candlestrength.com/
----- Original Message -----
From: "David" <<A
href=""><FONT face=Verdana
size=2>junk@xxxxxxxxxxxx>
To: <<A
href=""><FONT face=Verdana
size=2>equismetastock@xxxxxxxxxxxxxxx<FONT face=Verdana
size=2>>
Sent: Wednesday, May 19, 2004 3:12
AM
Subject: [EquisMetaStock Group] Code
Question
<FONT face=Verdana
size=2>> I have a problem with the ref function only being able to store
> constant data. I want to be able to reference the last time that
the > moving average of 5 crossed the 20 moving average. Then wait
to > generate a buy signal only after the forex pair has increased by a
> set amount, in this case .0020. How can I reference a certain
period > back if I do not know exactly the past period when it
crossed? Here > is the code I have so far:> >
{finding when the previous cross occured}> BC:= BarsSince(>
(Cross(Mov(C,5,W),Mov(O,20,W))> ));> > Num:= 0 - BC;
{assuming BarsSince returns non-negative number}> > {if close of
current bar minus close of cross bar is greater then> .002, then fire buy
signal}> (CLOSE - ( Ref(C,Num))) > .002> >
Appreciate any suggestions. By the way, the error generated is "The
> variable or expression must contain only constant data," and it
> points to the ref function.> > Thanks,>
David> > > > > ------------------------
Yahoo! Groups Sponsor ---------------------~-->> Make a clean sweep of
pop-up ads. Yahoo! Companion Toolbar.> Now with Pop-Up Blocker. Get it
for free!> <A
href=""><FONT
face=Verdana
size=2>http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/BefplB/TM<FONT
face=Verdana size=2>>
---------------------------------------------------------------------~->>
> > Yahoo! Groups Links> > <*> To visit
your group on the web, go to:> <A
href=""><FONT face=Verdana
size=2>http://groups.yahoo.com/group/equismetastock/<FONT
face=Verdana size=2>> > <*> To unsubscribe from this group, send
an email to:> <A
href=""><FONT face=Verdana
size=2>equismetastock-unsubscribe@xxxxxxxxxxxxxxx<FONT
face=Verdana size=2>> > <*> Your use of Yahoo! Groups is subject
to:> <A
href=""><FONT face=Verdana
size=2>http://docs.yahoo.com/info/terms/<FONT face=Verdana
size=2>> > >
Yahoo! Groups Sponsor
ADVERTISEMENT
Yahoo! Groups Links
To visit your group on the web, go to:http://groups.yahoo.com/group/equismetastock/
To unsubscribe from this group, send an email to:equismetastock-unsubscribe@xxxxxxxxxxxxxxx
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
|