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

Re: [amibroker] interactive data question?



PureBytes Links

Trading Reference Links

Sum adds up the last "n" number of bars. It sums whatever you put into the
first part of the sum formula.
Cum(1) adds 1 to the previous value of Cum, so the first bar is 1 and it
just keeps adding one to the last bar value of cum(1). You can use Cum to
add anything, like how many times you get rising days in the entire chart
Rise = C>O; //this gives results of 0 or 1
TotalRise = Cum(Rise);

You could limit this as well to time periods, or any other condition
Example would bne for total rise days since 1995
RecentRise = C>O and Year()>=1995; //this gives results of 0 or 1
TotalRise = Cum(RecentRise);

If you wanted to know how many rising days in the last 12 bars you would use
LastRises = Sum(Rise,12);

Hope this helps

Cheers,
Graham
http://e-wire.net.au/~eb_kavan/

-----Original Message-----
From: angus_83210 [mailto:rduncan@xxxxxxx] 
Sent: Wednesday, March 24, 2004 11:58 PM
To: amibroker@xxxxxxxxxxxxxxx
Subject: [amibroker] Can someone explain what this is doing?

Sum( Cum(1),n) n = 12  I understand that Cum(1) returns the number 
of the last bar.  But what is Sum doing and what number is it 
summing H/L/O/C?  

Thanks




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 
Yahoo! Groups Links



 



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 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
     http://groups.yahoo.com/group/amibroker/

<*> To unsubscribe from this group, send an email to:
     amibroker-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
     http://docs.yahoo.com/info/terms/