Thanks guys......the PositionScore and Setsort did the trick!
--- In [email protected], "Mike" <sfclimb...@...> wrote:
>
> If you want to run a backtest; Just set the PositionScore to the indicator
> value, then in the settings (or via code) set the maximum number of positions
> to 2.
>
> http://www.amibroker.com/guide/h_portfolio.html
> http://www.amibroker.com/guide/w_settings.html
> http://www.amibroker.com/guide/afl/setoption.html
>
> Mike
>
> --- In [email protected], "bretsmiles" <bretsmiles@> wrote:
> >
> >
> > I just bought the software a couple of days ago and this has probably been
> > discussed before, but does anyone know where I can find the code or how I
> > should go about programming the code that would allow me to select stocks
> > that qualify to be played on a certain day according to their rank. I
> > would like to rank on any indicator(s) value. For example, if five stocks
> > are possible plays for the day and I only want to play two, I want to rank
> > them according to there ADX score and play the top two, I would need to
> > find the max then loop through the array and rank from there I guess. Any
> > help is appreciated......thanks.
> >
>