PureBytes Links
Trading Reference Links
|
<SPAN
class=375503022-23032003>Anthony,
Cum(1)
is one ahead because it starts counting with 1. BarIndex starts counting with 0.
Try.........
<FONT
color=#282828 size=2>
x=ValueWhen( <FONT
size=2>H==HHV<FONT
size=2>(H,<FONT
size=2>260), BarIndex<FONT
color=#282828 size=2>() );
y=ValueWhen( <FONT
size=2>H==HHV<FONT
size=2>(H,<FONT
size=2>260), Ref<FONT
face=Arial size=2>(Cum(<FONT
size=2>1),-<FONT
face=Arial size=2>1)<FONT color=#282828
size=2> ); <FONT color=#000000
size=2>
Filter=1<FONT color=#282828
size=2>; <FONT color=#0000ff
size=2>
AddColumn(x,<FONT color=#ff00ff
size=2>"x",<FONT color=#ff00ff
size=2>1); <FONT color=#0000ff
size=2>
AddColumn(y,<FONT color=#ff00ff
size=2>"y",<FONT color=#ff00ff
size=2>1);
Jayson
<FONT face=Tahoma
size=2>-----Original Message-----From: Anthony Faragasso
[mailto:ajf1111@xxxxxxxx]Sent: Sunday, March 23, 2003 1:21
PMTo: amibroker@xxxxxxxxxxxxxxxSubject: Re: [amibroker]
Re: Explain output please for clarificationx=ValueWhen(
H==HHV(H,260), BarIndex() ); y=ValueWhen( H==HHV(H,260), Cum(1) );
Filter=1; AddColumn(x,"x",1); AddColumn(y,"y",1);
-------Original Message------- From:
amibroker@xxxxxxxxxxxxxxx Date: Sunday, March 23, 2003 12:42:09 To:
amibroker@xxxxxxxxxxxxxxx Subject: [amibroker] Re: Explain output please for
clarification > BARINDEX > - get zero-based bar number
Ok, you can start counting from 1 or from 0 and "zero-based" means that
barindex() starts counting from 0. > returns zero-based bar
number - the same as Cum(1)-1 but it is cum(1) instead starts
counting from 1. So barindex() gives 0 for the first bar and cum(1) gives 1
for the first bar. As clearly stated in the manual barindex() == cum(1) - 1.
Clear enough? Yahoo! Groups Sponsor ADVERTISEMENT
Send BUG REPORTS to bugs@xxxxxxxxxxxxx Send SUGGESTIONS
to suggest@xxxxxxxxxxxxx ----------------------------------------- Post
AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx (Web page: <A
href="">http://groups.yahoo.com/group/amiquote/messages/)
-------------------------------------------- Check group FAQ at: <A
href="">http://groups.yahoo.com/group/amibroker/files/groupfaqhtml
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
Send
BUG REPORTS to bugs@xxxxxxxxxxxxxSend SUGGESTIONS to
suggest@xxxxxxxxxxxxx-----------------------------------------Post
AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx (Web page: <A
href="">http://groups.yahoo.com/group/amiquote/messages/)--------------------------------------------Check
group FAQ at: <A
href="">http://groups.yahoo.com/group/amibroker/files/groupfaq.html
Your use of Yahoo! Groups is subject to the <A
href="">Yahoo! Terms of Service.
Yahoo! Groups Sponsor
ADVERTISEMENT
Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
|