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

Re: [amibroker] Re: Cumulative Volume Indicator



PureBytes Links

Trading Reference Links

Barssince starts at zero and  counts from there
If you want to include in the Sum the bar that barssince is counting from
you need to add 1 to the barssince value

Cumvol = IIf(CountWhile,Sum(V,BarsSince(begvol)+1),0);



-- 
Cheers
Graham
AB-Write >< Professional AFL Writing Service
Yes, I write AFL code to your requirements
http://www.aflwriting.com



On 10/12/06, Terry <MagicTH@xxxxxxxxxxx> wrote:
>
> Or just make the begval 1 minute sooner...
>
> begvol = TimeNum() == 093400;
> --
> Terry
>
> -----Original Message-----
> From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx] On
> Behalf
> Of mjarvis999
> Sent: Saturday, December 09, 2006 20:35
> To: amibroker@xxxxxxxxxxxxxxx
> 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 amibroker@xxxxxxxxxxxxxxx, "Terry" <MagicTH@xxx> 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: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx]
> On Behalf
> > Of Eric and Christy Wagner
> > Sent: Saturday, December 09, 2006 16:23
> > To: amibroker@xxxxxxxxxxxxxxx
> > 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
>
>
>
>
>
>
> 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
>
>
>
>

Content-Description: "AVG certification"
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.432 / Virus Database: 268.15.15/581 - Release Date: 12/9/2006 3:41 PM