I think this could be done by AB. It would be an intermediate/advanced level of programming - not for a newbie.
One of the difficult problems is you have to write a 2-dimensional sort routine Dimension 1 is the value of your ranking indicator for each ticker in the WatchList. This is easy since AB supports x[1] = 1.2, x[2]=3.5 etc ie - arrays of numbers. There are sort routines available here and the AB website library. Dimension 2 this is more difficult since AB does not support arrays of strings like y[1] = "SPY", Y[2] = "DIA", etc so carrying the ticker symbol along while you are sorting your ranking indicator value is more difficult. I used the index number from "GetCategorySymbols( categoryWatchlist, listnum ));" construct. If you want to plot your results you have to construct this sorted 2-dim array for each day you want to plot (one plot for each ticker in your Watchlist, of course) - another tricky programming task, but do-able. I've got this to work for an arbitrary WatchList of arbitrary length - but it wasn't easy. Maybe some other contributor has an easier method to create a 2-dimensional numerical+text string sort??? Now once you have the paired list of each ticker in order by your ranking indicator, you need to hand the top n symbols off to the back tester along with your entry/exit rules. I haven't done this part but I think it would be possible. In summation - this is do-able, but difficult programming task. ReefBreak --- In [email protected], "love_carrot_cake" <[EMAIL PROTECTED]> wrote: > > I have went through the tutorial and documentation but it's still not > clear to me if Amibroker can do what I'm looking for. I would > appreciate it greatly if someone could tell me if it can do it. It's > quite simple really but I don't have experience with this sort of thing. > > My strategy that I want to backtest is this: > > each day I want to scan a watchlist of around 10-50 symbols > the scan is for certain indicator criteria, for example macd recently > crossed over, etc. > I'd like to rank the results, for example by stoch or by volume > I'd then like to buy the top x stocks (configurable of course) > I'd like to configure the exact entry, exit, and stop > > I'd like to backtest this strategy over a long period and show the > results. > > If Amibroker can do this I would like to invest the amount of time > required to learn AFL and purchase the software. Thanks for your help. >
