I've got a problem that I've been trying to use the CBT to fix but just can't seem to get it working. I've included a detailed description below of the problem, but what's needed as an easy solution would be for a command that would take the positionscore sort stock list and tell Amibroker to only consider the top X stocks.
So assume each day we run a scan for possible stocks to trade. We are also only going to enter limit orders for 10 stocks even if there are more than that in the scan. We are going to sort the stocks by historical volatility. So lets assume today we have 100 stocks that are possible for tomorrow. We sort and only enter the top 10 stocks. Now the problem is that i don't know how to limit Amibroker to only look at the top 10 stocks like we would do manually. I have setup Amibroker to only take a maximum of 10 trades or slots. The way Amibroker does it now with the positionscore setting, the 100 stocks are sorted by historical volatility, but it will look though all of the sorted 100 stocks, in sorted order, until it finds a maximum of 10 stocks that have hit the limit orders (assuming we have 10 that hit). So for the manual case, we might only have 1 stock out of the top 10 that actually triggered, whereas since Amibroker is looking at the whole list, we might end up with more stocks triggering (up to 10) that we would of never entered. Does anyone have a solution to this? I have many trading systems that i would like to backtest but can't since i'm not able to reproduce how i would trade it manually. Thanks, Mark
