Thank you, Paul.

It works perfectly.

I was struggling with "Pad and Align", SetForeign() and "for Loop"
with no avail for a long time.

I counld never come up with AddToComposite() idea myself ...


--- In [email protected], "Paul Ho" <[EMAIL PROTECTED]> wrote:
>
> 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" <paul.tsho@> 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