PureBytes Links
Trading Reference Links
|
hi,
just use:
begvol = TimeNum() == 093000;
endvol = TimeNum() == 160000;
CountWhile = Flip(begvol,endvol);
Cumvol = IIf(CountWhile,Sum(V,BarsSince(begvol)),0);
//Plot(Cumvol,"Cumvol",colorWhite,styleHistogram);
PlotOHLC( Cumvol, Cumvol, 0, 0, "Cumvol", colorWhite, styleCloud );
Or if you want to show this chart for stocks that are illiquid and
therefor might not have a datapoint at 093000 you might want to use
the dedatetime plugin. You will need to download this plugin from the
files section. If you use that the code will look like:
begvol = deFlagFirstBarOfDay(093000);
endvol = deFlagLastBarOfDay(160000);
CountWhile = Flip(begvol,endvol);
Cumvol = IIf(CountWhile,Sum(V,BarsSince(begvol)),0);
//Plot(Cumvol,"Cumvol",colorWhite,styleHistogram);
PlotOHLC( Cumvol, Cumvol, 0, 0, "Cumvol", colorWhite, styleCloud );
--- In amibroker@xxxxxxxxxxxxxxx, "ges x" <ges8ges@xxx> wrote:
>
> Hmmm....every change to the bar duration messes this formula up.
>
> So, is there a way to just identify each day?
>
> On 9/6/07, ges x <ges8ges@xxx> wrote:
> >
> > OK, it had to do with the time and the chart time frame. I was using
> > hourly bars and the timenum() was not correct. This works:
> >
> > begvol = TimeNum() >= 093000 AND TimeNum() <= 103000;
> > endvol = TimeNum() >= 160000 AND TimeNum() <= 160100;
> > CountWhile = Flip(begvol,endvol);
> > Cumvol = IIf(CountWhile,Sum(V,BarsSince(begvol)),0);
> >
> >
> > //Plot(Cumvol,"Cumvol",colorWhite,styleHistogram);
> > PlotOHLC( Cumvol, Cumvol, 0, 0, "Cumvol", colorWhite, styleCloud );
> >
> > On 9/6/07, ges x <ges8ges@xxx> wrote:
> > >
> > > Thanks for the code. As it is, it displays nothing, so there
must be
> > > some mistake in it. I'll look at it and see if I can figure it out.
> > >
> > >
> > > On 9/6/07, Edward Pottasch <empottasch@xxx> wrote:
> > > >
> > > > I googled for it and adjusted it a little bit, rgds, ed
> > > >
> > > >
> > > > begvol = TimeNum() == 153000 ;
> > > > endvol = TimeNum() == 220000;
> > > > CountWhile = Flip(begvol,endvol);
> > > > Cumvol = IIf(CountWhile, Sum(*V*,BarsSince(begvol)), 0);
> > > >
> > > > //Plot(Cumvol,"Cumvol",colorWhite,styleHistogram);
> > > > PlotOHLC( Cumvol, Cumvol, 0, 0 , "Cumvol", *colorWhite*,
*styleCloud*);
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > ----- Original Message -----
> > > > *From:* ges <ges8ges@xxx>
> > > > *To:* amibroker@xxxxxxxxxxxxxxx
> > > > *Sent:* Thursday, September 06, 2007 5:13 AM
> > > > *Subject:* [amibroker] Coding question: How do identify individual
> > > > days in RT data...
> > > >
> > > > I want to be able to sum or cum various values on RT charts.
> > > >
> > > > For example, I'd like to be able to compute a cumulative value for
> > > > volume for each individual day on a multi-day realtime chart. The
> > > > first bar at the open, the last bar at the close, but a new cum
> > > > starting each day.
> > > >
> > > > I have to admit I am confused by all the date/time functions
and how
> > > > to separate out an individual day.
> > > >
> > > > Any suggestions?
> > > >
> > > > Thanks,
> > > >
> > > > ges
> > > >
> > > >
> > > >
> > >
> > >
> >
>
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/
|