Depending on what you intend to backtest, you may go for a general loop under the form of:
start:=-1200; finish:=-550;
for enterbar = start to finish step 1 do if "Conditions to enter" then print symbol,date(enterbar),open(enterbar+1); for exitbar = enterbar+1 to finish step 1 do if "Conditions to exit" then print date(exitbar),open(exitbar+1); endif; enterbar:=finish; next exitbar; println; endif; // if you don't want multiple entry signal for the same ticker enterbar:=finish; next enterbar; But if you want to do more, you need to include another layer such as dos, winbatch or any other programming language you're comfortable with. I am working on a three-tier approach: 1) selected list of stocks based on price, sector, volume and volatility; 2) a setup condition; 3) a confirmation signal based on bollinger bands and comparison of indicators between 2) and 3). If you want to handle such a process, you will need more than a QP scan, since you can only retrieve the symbol from the *.lst file and for my backtests I need volume, price and some others as well. I think that they are planning to include such features in the future, let's hope.
Alain Joaris |