PureBytes Links
Trading Reference Links
|
Great! Thanks Jose, David.
--- In equismetastock@xxxxxxxxxxxxxxx, "Jose" <josesilva22@xxxx>
wrote:
>
> ---8<---------------------------
>
> BC:=Cross(Mov(C,5,W),Mov(O,20,W));
>
> {if close of current bar minus close of cross bar is greater
then.002,
> then fire buy signal}
>
> C-ValueWhen(1,BC,C) > .002
>
> ---8<---------------------------
>
> jose '-)
>
>
> --- In equismetastock@xxxxxxxxxxxxxxx, "David" <junk@xxxx> wrote:
> > 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 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:
http://docs.yahoo.com/info/terms/
|