PureBytes Links
Trading Reference Links
|
Roy, AmiBroker's
LLV accepts arrays. See the AB code and GIFs for AB and MS
6.52.
Bob
---
up =BarsSince(RSI(9)>70<FONT
color=#000080>);
up =IIf(up==0,1,up);
llvRSI = LLV(RSI(9),up);<FONT
color=#0000ff>
Plot<FONT
color=#000080>(up,"up"<FONT
color=#000080>,colorBlue);
Plot<FONT
color=#000080>(llvRSI,"llvRSI"<FONT color=#000080
size=3>,colorRed);
-----Original
Message-----From: Roy Larsen [<A
href="">mailto:rlarsen@xxxxxxxxxxxxxx]Sent:
Friday, April 04, 2003 8:56 PMTo: Metastockusers@xxxxxxxxxxxxxxxSubject:
Re: [Metastockusers] Formula AssistanceBobYour experiences
warrant some further testing on my part in MS. I onlychecked my own
version, as presented, and I didn't think try othervariations. Thank you for
your thought provoking comments.Roy> I was really addressing
why cbfrish's up:=BarsSince(RSI(9)>70);> LLV(RSI(9),LastValue(up))
worked [didn't return an error msg] and hadn't> checked the code
output.>> Your question prompted me to stick the indicators on a
chart.> Eureka--LastValue(up) is [dud] its rightmost value today -- not
at all> what's wanted***.> I agree that
LastValue(PREV+up-PREV)does the trick but note another>
curiosity:> up:=If(up=0,1,up+10); LLV(RSI(9),LastValue(PREV+2-PREV));
yields the> same answer!> Corey to the rescue?>>
Bob> ---> ***I'm sure there's a simpler way; might have a go at in
AmiBroker, a> more familiar PREV-less tongue.> --->
-----Original Message-----> From: Roy Larsen [<A
href="">mailto:rlarsen@xxxxxxxxxxxxxx]>
Sent: Friday, April 04, 2003 3:03 PM> To:
Metastockusers@xxxxxxxxxxxxxxx> Subject: Re: [Metastockusers] Formula
Assistance>>> Bob>> But why does the
+PREV-PREV within the LastValue() do what it does? I> understand why
LastValue() works in the LLV, but not why +PREV-PREV> returns> the
desired (changing) value of "up". I also understand the normal>
workings> of PREV, but this particular usage is quite different yet very
effective> in> this case.>> The "PREV+up-PREV"
returns the current (or is it previous) value of the> expression "up"
rather than the PREVious value of the containing "LLV"> expression that
one would expect.>> Roy>> ----- Original Message
-----> From: "Bob Jagow" <bjagow@xxxxxxxxxxx>> To:
<DEFANGED_Metastockusers@xxxxxxxxxxxxxxx>> Sent: Saturday, April
05, 2003 10:32 AM> Subject: RE: [Metastockusers] Formula
Assistance>>> > Roy,> > I think it works
because LLV(array,period) needs the scalar variable> > that LastValue
retrieves> > from the BarsSince array.> >> >
Bob> >> > -----Original Message-----> > From: Roy
Larsen [<A
href="">mailto:rlarsen@xxxxxxxxxxxxxx]>
> Sent: Friday, April 04, 2003 1:29 PM> > To:
Metastockusers@xxxxxxxxxxxxxxx> > Subject: Re: [Metastockusers]
Formula Assistance> >> >> > 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:
<DEFANGED_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> > <A href=""
target=_blank>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> > <A href=""
target=_blank>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>
> <A href=""
target=_blank>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> <A href=""
target=_blank>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> <A
href=""
target=_blank>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 <A href=""
target=_blank>http://docs.yahoo.com/info/terms/>>>------------------------
Yahoo! Groups Sponsor ---------------------~-->Make Money Online
Auctions! Make $500.00 or We Will Give You Thirty Dollars for Trying!<A
href=""
target=_blank>http://us.click.yahoo.com/yMx78A/fNtFAA/i5gGAA/zMEolB/TM---------------------------------------------------------------------~->To
unsubscribe from this group, send an email
to:Metastockusers-unsubscribe@xxxxxxxxxxxYour use of Yahoo!
Groups is subject to <A href=""
target=_blank>http://docs.yahoo.com/info/terms/
Yahoo! Groups Sponsor
To unsubscribe from this group, send an email to:
Metastockusers-unsubscribe@xxxxxxxxxxx
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
Attachment:
Up AB.gif
Description: GIF image
Attachment:
Attachment:
Description: "Description: GIF image"
Attachment:
Description: "Up MS.gif"
|