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

[amibroker] Re: Summing values at each bar for the past 200 days



PureBytes Links

Trading Reference Links

Dimitris,

This code checks only for a pre-defined time interval.  What I wanted 
was for the 100 bar window to "slide" with the current bar.  So, on 
bar 200, it would look at bars 100-200.  On bar 300, it would look at 
bars 200-300.

HB

--- In amibroker@xxxxxxxxxxxxxxx, "DIMITRIS TSOKAKIS" <TSOKAKIS@xxxx> 
wrote:
> For bars 200 to 300 it is an 100bar interval, not 200bar.
> Anyway, Sum() function can do the job.
> for specific periods you may work with Cum() also
> cond=datenum()>1010101 AND datenum()<1020101;
> YearCV=cum(cond*C*V);
> will give you the cummmulative C*V for Year 2001.
> Dimitris Tsokakis
> --- In amibroker@xxxxxxxxxxxxxxx, "hmab1" <hossamb@xxxx> wrote:
> > 
> > Hello,
> > 
> > At each bar, I would like to sum the value of the close*volume 
for 
> > the past 200 days.  I.e. let's say you have 600 bars of date. At 
> bar 
> > 300, I would like to determine the sum of the close*volume for 
bars 
> > 200 thru 300.
> > 
> > Is this possible in AFL ?
> > 
> > Thanks,
> > HB


------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Ink Cartridges & Refill Kits for Your Epson at Myinks.com
Free shipping on orders $50 or more to the US and Canada.
http://www.c1tracking.com/l.asp?cid=5705&lp=home/epson.asp
http://us.click.yahoo.com/brYXfA/_xWGAA/ySSFAA/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/