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" <[EMAIL PROTECTED]> To: <[email protected]> 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 > > >
