[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Metastockusers] Formula Assistance



PureBytes Links

Trading Reference Links

cbfrish

Modifying the formula from Makridis Spyros as below should be even more
useful.

up:=BarsSince(RSI(9)>70);
up:=If(up=0,1,up);
LLV(RSI(9),LastValue(PREV+up-PREV));

The use of LastValue() allows a variable to be used as a constant that is
uniform for the entire chart, and combining it with +PREV-PREV allows the
current value to be used as a constant. Don't ask me why this works, or why
it only works with some applications because I don't know. This appears to
be one of the applications where it does work so you're in luck.

BarsSince() can return "zero" so it's necessary to adjust it because the LLV
for "zero" periods will not return a useful value.

Thanks to Corey Saxe for this interesting solution.

Roy

----- Original Message -----
From: "Makridis Spyros" <MAKRISPY@xxxxxxxxx>
To: <Metastockusers@xxxxxxxxxxxxxxx>
Sent: Saturday, April 05, 2003 3:09 AM
Subject: Re: [Metastockusers] Formula Assistance


> up:=BarsSince(RSI(9)>70);
> LLV(RSI(9),LastValue(up))
> ----- Original Message -----
> From: "cbfrish" <cbfrish@xxxxxxxxxxx>
> To: <DEFANGED_Metastockusers@xxxxxxxxxxxxxxx>
> Sent: Friday, April 04, 2003 4:39 PM
> Subject: [Metastockusers] Formula Assistance
>
>
> > Hello, all.  I've just found this group and am asking for some
> > assistance.
> >
> > In an exploration I'm working on, I've defined a variable
> > as "up:=BarsSince(RSI(9)>70);".
> >
> > In employing this variable in the expression
> > "LLV(RSI(9),up)", I get the following error
> > at the point of using "up":  "This variable or
> > expression must contain only constant data."
> >
> > I was of the understanding that the variable "up" as
> > defined would return a constant, i.e. the number of
> > bars since RSI(9)>70 last occurred, which would be
> > useable as employed.
> >
> > Can the group please help me understand what's wrong?  Thanks in
> > advance.
> >
> >
> >
> >
> >
> > To unsubscribe from this group, send an email to:
> > Metastockusers-unsubscribe@xxxxxxxxxxx
> >
> >
> >
> > Your use of Yahoo! Groups is subject to
http://docs.yahoo.com/info/terms/
> >
> >
> >
>
>
>
>
> To unsubscribe from this group, send an email to:
> Metastockusers-unsubscribe@xxxxxxxxxxx
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>
>



------------------------ Yahoo! Groups Sponsor ---------------------~-->
FREE Cell Phones with up to $400 Cash Back!
http://us.click.yahoo.com/_bBUKB/vYxFAA/i5gGAA/zMEolB/TM
---------------------------------------------------------------------~->

To unsubscribe from this group, send an email to:
Metastockusers-unsubscribe@xxxxxxxxxxx

 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/