PureBytes Links
Trading Reference Links
|
Hello,
You get "bad args" error because
HighestSince/LowestSince
have different syntax than in MS:
HIGHESTSINCE (AFL 1.4)
SYNTAX
highestsince( EXPRESSION, ARRAY, Nth =
1 )
RETURNS
ARRAY
FUNCTION
Returns the highest ARRAY value since
EXPRESSION was true on the Nth most recent occurrence.
EXAMPLE
highestsince( Cross( macd(), 0 ), Close, 1 )
returns the highest close price since macd() has crossed above
zero.
Note that Nth parameter is last one and it has the default
value of 1 (so it can be omitted).
Note also that <FONT face=Tahoma
size=2>LastValue is something completely different that MS-like
PREV.
LastValue returns the very last value of the array
(looks
into the future).
Best regards,Tomasz
Janeczko===============AmiBroker - the comprehensive share
manager.<FONT face=Tahoma
size=2>http://www.amibroker.com
----- Original Message -----
From: <<A
href=""><FONT face=Tahoma
size=1>bmx888@xxxx>
To: <<A
href=""><FONT face=Tahoma
size=1>amibroker@xxxxxxxxxxxxxxx<FONT face=Tahoma
size=1>>
Sent: Wednesday, November 21, 2001 9:34
PM
Subject: [amibroker] Bad Args
<FONT face=Tahoma
size=1>> Dear Tomasz and Other AFL Gurus,> > This is an
indicator to calculate zigzag from highs and lows. I > translated the
indicator from MS and it no longer works. What > happened? It keeps
giving me "bad args" error.> > I use "lastvalue" to replace
"PREV".> > ===========================>
A=IIf(LastValue(A)==1,IIf(L<HighestSince(1,LastValue(A)!=1,H)*0.96,->
1,LastValue(A)),IIf(LastValue(A)==-1,IIf(H>LowestSince(1,LastValue(A)!>
=-1,L)*1.04,+1,LastValue(A)),IIf(LastValue(A)=0,IIf(H>LowestSince>
(1,LastValue(A)!=-1,L)*1.04,+1,IIf(L<HighestSince(1,LastValue(A)!=1,H)>
*0.96,-1,LastValue(A))),LastValue(A))));> HL=IIf(A==1,
LowestSince(1,A!=-1,L), If(A=-1, HighestSince(1,A!=1,H), >
LastValue(A)));> Graph1=HL;> > >
------------------------ Yahoo! Groups Sponsor
---------------------~-->> Universal Inkjet Refill Kit $29.95>
Refill any ink cartridge for less!> Includes black and color ink.>
<FONT
face=Tahoma
size=1>http://us.click.yahoo.com/ltH6zA/MkNDAA/ySSFAA/dkFolB/TM<FONT
face=Tahoma size=1>>
---------------------------------------------------------------------~->>
> > > Your use of Yahoo! Groups is subject to
<FONT face=Tahoma
size=1>http://docs.yahoo.com/info/terms/
> > >
|