[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,

Thank you...This was what I was looking for, your following statement...

"if you want the actual bar count use cum(1)........."

Thanks also to pallmont and Graham  and Tomasz for their help.

Anthony

Jayson wrote:

>  Anthony,Cum is still there, barindex is just (apparently) faster for
> use in indicators. In most of my use of cum(1) I simply use it to
> allow me to count bars or mark a point in time. If the bar number is
> 1500 or 1501 is usually not an issue as long as the count is
> consistent. If it is important to you then cum(1) counts the very
> first bar as 1, barindex counts the very first bar as Zero so if you
> want the actual bar count use cum(1)......... Jayson
> -----Original Message-----
> From: Anthony Faragasso [mailto:ajf1111@xxxxxxxx]
> Sent: Sunday, March 23, 2003 7:11 PM
> To: amibroker@xxxxxxxxxxxxxxx
> Subject: RE: [amibroker] Re: Explain output please for clarification
>
> 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.
>
>
>
>
> 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/