SI
SI
discoversearch

We've detected that you're using an ad content blocking browser plug-in or feature. Ads provide a critical source of revenue to the continued operation of Silicon Investor.  We ask that you disable ad blocking while on Silicon Investor in the best interests of our community.  If you are not using an ad blocker but are still receiving this message, make sure your browser's tracking protection is set to the 'standard' level.
Strategies & Market Trends : TA-Quotes Plus

 Public ReplyPrvt ReplyMark as Last ReadFilePrevious 10Next 10PreviousNext  
To: big run who wrote (7904)2/18/1999 11:14:00 PM
From: bdog  Read Replies (1) of 11149
 
hi big run, as per discussion on BTA thread,
Message 7887168

no big brains here,... pretty simple actually...here is a sample backtest engine, can use it for daily scan too by commenting out/in the switch, just change the params to your liking...

note that the output cannot tell % winner/loosers so another variable could be setup to flag a 1 for winner and a 0 for loss, since Q+ cannot accumulate that data across issues you need to import that variable into a spreadsheet and do a calc and then you have that information.... see, nothing to it

example output has ticker, date, buy price, sell price, % gain/loss and the qrs day of signal

bsimpledog

//backtest example

output="backtest.lst";

//input="prescan.lst";
//input="common.lst";

daystoload=250;
daysrequired=250;

integer md1,mbtest,mstart,mstop;

// remove the [//] coment markers to use as daily scan
//mbtest:=0;//daily switch
//mstart:=0;
//mstop:=0;

// comment out to use daily scan
mbtest:=1; //backtest switch
mstart:=-25;
mstop:=-15;

for md1 = mstart to mstop step 1 do

//prescan req
if emovavg(md1,21,vol)>25000 then
if Sharesfloat < 20 then
if close(md1) >= 1 then
if close(md1)<=10 then

//params
if close(md1)>open(md1) then
if vol(md1)> vol(md1-1) then
if qrs(md1) > 85 then
if close(md1) > movavg(md1,200,cl)then
if movavg(md1,200,cl) > movavg(md1-10,200,cl) then
set stochastic = 13,3,8;
if stochasticPctK(md1)<30 then

//backtest output
//buy @ open next day, sell @ open in 13 days after
if mbtest =1 then
println symbol:-8,date(md1+1):10,open(md1+1):8:3,open(md1+14):8:3,
(open(md1+14)-open(md1+1))/open(md1+1):8:2,"day b4 qrs=":15,qrs(md1);
endif;

//daily scan
if mbtest =0 then
println symbol:-8,close(md1);
endif;

endif;endif;endif;endif;endif;
endif;endif;endif;endif;endif;

next md1;
Report TOU ViolationShare This Post
 Public ReplyPrvt ReplyMark as Last ReadFilePrevious 10Next 10PreviousNext