Or just make the begval 1 minute sooner... begvol = TimeNum() == 093400; -- Terry
-----Original Message----- From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of mjarvis999 Sent: Saturday, December 09, 2006 20:35 To: [email protected] Subject: [amibroker] Re: Cumulative Volume Indicator The interesting thing is the first bar is not added to the cumvol, when using flip. This is the cumulative volume script that I use. D = Day(); CV[0]=V[0]; for(i=1;i<BarCount;i++) {if(D[i] == D[i-1]) {CV[i]=V[i]+CV[i-1]; } else {CV[i]=V[i]; } } --- In [email protected], "Terry" <[EMAIL PROTECTED]> wrote: > > Interesting results: > > begvol = TimeNum() == 093500; > endvol = TimeNum() == 114500; > CountWhile = Flip(begvol,endvol); > Cumvol = IIf(CountWhile,Sum(V,BarsSince(begvol)),0); > > Plot(Cumvol,"cumvol",1); > > -- > Terry > > -----Original Message----- > From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf > Of Eric and Christy Wagner > Sent: Saturday, December 09, 2006 16:23 > To: [email protected] > Subject: [amibroker] Cumulative Volume Indicator > > I am trying to create a cumulative volume indicator based upon > certain times during the day. For example, I would like to know > the premarket volume of spy from 8amEST to 092000 EST. This would > be cumulative from 8 to 9:20 and then it would go to 0 and start > over every day from 0 at 8AM EST. This is what I have so far: > > Sumvol = Cum(V); > begvol = TimeNum() == 093500; > endvol = TimeNum() == 114500; > > cumvol = IIf(TimeNum() >= begvol AND TimeNum()<= endvol, Sumvol,0); > > When I plot this I get a blank window. Would anyone like to help me > out? > > Thanks > Eric > > > > > > > Please note that this group is for discussion between users only. > > To get support from AmiBroker please send an e-mail directly to > SUPPORT {at} amibroker.com > > For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG: > http://www.amibroker.com/devlog/ > > For other support material please check also: > http://www.amibroker.com/support.html > > Yahoo! Groups Links > Please note that this group is for discussion between users only. To get support from AmiBroker please send an e-mail directly to SUPPORT {at} amibroker.com For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG: http://www.amibroker.com/devlog/ For other support material please check also: http://www.amibroker.com/support.html Yahoo! Groups Links
