Thank you for all your inputs. I'm just getting back from a stomach virus so I took some time off. Yes, I already knew that a purchase of a stock prediction would be sketchy since I wouldn't know which one would get hit first in the OCA order. The random function does help in this situation just a little bit but it's not the answer. Like people said, I would need intra-day data.
I also noticed that I need a better exit strategy. Sells on the 3rd or more bar day usually ends up in a loss. I have to play with that a bit. I should give you some background of how I came up with this script. I played around with WealthLab 4 years ago which had a nifty feature of not only backtesting a script but a batch of scripts. I most of backtested thousands of user's scripts against a basket of 20 or so high volume ETF's. The best results came up with from an ATR script and also a True Range script which is just a variation of a regular ATR script. If you charted the backtest results, it's a bit smoother than most scripts probably because it deals usually with a 2 bar day trade and it's working with ETF's. Technicals on ETF's are a bit different as you can imagine.
