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

[amibroker] Re: question about the buyprice array



PureBytes Links

Trading Reference Links

thank you. Mark.

--- In amibroker@xxxxxxxxxxxxxxx, "Mark Jarvis" <mark.jarvis@xxx> wrote:
>
> Eric,
> 
> Buy= exrem(buy,sell);
> 
> will remove all buy values until you receive a sell signal.
> 
> On 19/01/07, eric tao <erichtao@xxx> wrote:
> >
> >   Hi all,
> >
> > I have a question about the buyprice referencing.
> > let's say after the buy = codition, AB generated arrays
> >
> > 1 2 3 4 5 <- bar index
> > 1 1 1 0 0 <- buy array
> > $10 12 13 14 15 <- buyprice = open;
> > ^
> > if for some reason the backtest system enter the position at bar 2,
> > how to reference the actual entry price later in the code? for
> > instance, at "sell =" statement.
> >
> > I think
> > ref(buyprice, -barssince(buy));
> > won't work, it simply return $13 at bar4 and bar5.
> >
> > Please advice, thank you.
> >
> > Eric
> >
> >  
> >
>



Content-Description: "AVG certification"
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.432 / Virus Database: 268.17.1/640 - Release Date: 1/19/2007 4:46 PM