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

Re: [amibroker] cumulative volume in a week



PureBytes Links

Trading Reference Links

Try this:

DayNum      = iif(DayofWeek() ==0 or DayofWeek() >5,5,DayofWeek());
CumVolume = Sum(Volume,DayNum);

This should give you the number of days past in current week and assume it 
is Friday if a weekend.

A

----- Original Message ----- 
From: "murthysuresh" <money@xxxxxxxxxxxxxx>
To: <amibroker@xxxxxxxxxxxxxxx>
Sent: Wednesday, August 20, 2008 1:11 PM
Subject: [amibroker] cumulative volume in a week


>i am trying to get the cumulative volume so far in a week. i am having
> a hard trouble as the data does not seem to match on paper
> newWeek=DayOfWeek()<Ref(DayOfWeek(),-1);
> WeeklyCumulativeVol=Sum(V,BarsSince(newWeek==1));
> i would appreciate some help here.
>
>
> ------------------------------------
>
> 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

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

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/amibroker/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:amibroker-digest@xxxxxxxxxxxxxxx 
    mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx

<*> 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/