Sorry my mistakes
the data holes in last x bars should be
NoofMarketDays = N - ref(N, -xbars);
holes = NoofMarketDays - xbars;

--- In [email protected], "Paul Ho" <[EMAIL PROTECTED]> wrote:
>
> Not easily
> but the following should work
> create a afl that do atc on DJI
> --------------------------
> if(name() == ^DJI)
> addtocomposite(cum(1), "~bars", "X");
> 
> --------------------------------------
> this will create an array of bar numbers of the market days
> So N = foreign("~bars", "C");
> and your data holes are cum(1) - N
> thats it
> 
> --- In [email protected], "buandbe" <buandbe@> wrote:
> >
> > I'd like to sum the volumes of the last N market days.
> > 
> > When there are M holes in the data in the last N market days, how 
do I
> > get ( N - M ) ?
> > 
> > TIA
> >
>


Reply via email to