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

RE: [amibroker] Re: Explain output please for clarification



PureBytes Links

Trading Reference Links

Jayson,
 
The reason that I have posted these examples is because with the earlier
versions of AB, ( before Barindex() was introduced ) ,when we wanted to know
the bar number of some value...it was written as follows:
 
y=ValueWhen( H==HHV(H,260), Cum(1) ); 
 
So, why has it now changed....Therefore, rendering any caluculations using
the above formula type, USELESS!!??
 
I am trying to understand....
 
If I now want to know the Bar Number....what is the proper formula ????
 
Anthony
 
 
-------Original Message-------
 
From: amibroker@xxxxxxxxxxxxxxx
Date: Sunday, March 23, 2003 17:36:16
To: amibroker@xxxxxxxxxxxxxxx
Subject: RE: [amibroker] Re: Explain output please for clarification
 
Anthony,
Cum(1) is one ahead because it starts counting with 1. BarIndex starts
counting with 0. Try.........
 
x=ValueWhen( H==HHV(H,260), BarIndex() ); 
y=ValueWhen( H==HHV(H,260), Ref(Cum(1),-1) ); 
Filter=1; 
AddColumn(x,"x",1); 
AddColumn(y,"y",1); 
 
 
Jayson 
-----Original Message-----
From: Anthony Faragasso [mailto:ajf1111@xxxxxxxx]
Sent: Sunday, March 23, 2003 1:21 PM
To: amibroker@xxxxxxxxxxxxxxx
Subject: Re: [amibroker] Re: Explain output please for clarification
 
 
x=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: 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. 
 
 
 
 
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. 
 
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. 
 
 

------------------------ Yahoo! Groups Sponsor ---------------------~-->
Make Money Online Auctions! Make $500.00 or We Will Give You Thirty Dollars for Trying!
http://us.click.yahoo.com/yMx78A/fNtFAA/46VHAA/GHeqlB/TM
---------------------------------------------------------------------~->

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 http://docs.yahoo.com/info/terms/