sorry to have missed the second part. You can look at the "barssince"
function to achieve it. Or you can loop through each bar for this if
you have specific conditions to be satisfied. Look for "Backtesting
your trading ideas" in the user manual.

Warm Regards


--- In [email protected], "kar_avi" <[EMAIL PROTECTED]> wrote:
>
> If you are looking at price change only as a measure of performance,
> you can look up ROC in the user manual and use ROC(C, 15) on a daily
> chart and sort them from the AA results window.
> 
> Hope this helps,
> Kar
> 
> --- In [email protected], "samu_trading" <samu_trading@> wrote:
> >
> > How could I code this for backtesting in AB?
> > 
> > Buy on Friday the ticker symbol with the best performance of the last 
> > 15 trading days.
> > 
> > Sell 5 weeks later
> > 
> > 
> > Thanks, Samantha
> >
>


Reply via email to