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

Re: [amibroker] Cumulative Volume Indicator



PureBytes Links

Trading Reference Links

Assuming you have bars with the defined times. You are also doubling up on
the conditions, begvol = TimeNum() == 093500; is a 0 or 1, so you can never
have it correct in the next part cumvol = IIf(TimeNum() >= begvol
..............

Here is a short routine for what I think you are wanting, to sum the volume
from the first time to the second time

begvol = 93500;
endvol = 114500;
cumvol = IIf(TimeNum()<=endvol AND TimeNum()>=begvol, Sum( V,
BarsSince(TimeNum()==begvol)+1), 0);
Plot(Cumvol,"cumvol",colorRed,styleHistogram);


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



On 10/12/06, Eric and Christy Wagner <ericandchristy@xxxxxxxxx> wrote:
>
> 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
>
>
>
>

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