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 : Metastock 6.0 for Window

 Public ReplyPrvt ReplyMark as Last ReadFilePrevious 10Next 10PreviousNext  
To: dli who wrote (3662)9/27/2000 10:23:39 AM
From: bdog  Read Replies (4) of 4056
 
OK, Dave, here ya go. I stripped some of the code out but you will still have to deal with some foo foo, lol. sorry. there is some backtest stuff in there too.

I'm sure Paul could reduce it to 1 or 2 lines...>g<

you can change some of the variables in it as mbase, mtop and mbot to your liking and maybe some of the buyouts will disappear.

bdog

//htf v1.0 by bdog 06/28/99

output="htf.lst";

exchange=AMEX,NASDAQ,NYSE;
issuetype=common;

input="common.lst";

//daystoload=250;
//daysrequired=250;

integer md1,mbtest,mstart,mstop,mresult,mhit,mpaste,m5gain,mloss,mbase;
float mtop,mbot;

md1:=0;
mbase:=-10;
mtop:=1.05;
mbot:=.95;

//mbtest 0 daily ,1 backtest, 2 detail btest, 3 ss anayl btest

mbtest:=0; //backtest
mstart:=-10; //-19=last 20 trade days
mstop:=-5;

// test for daily
if mbtest=0 then
mstart:=0;
mstop:=0;
endif;


for md1 = mstart to mstop step 1 do

//backtest variables
mhit:=0;

// double
if max(md1,md1-21,hi)>= 2*min(md1-22,md1-60,lo) then

//htf
if close(md1) <=mtop*max(md1-1,mbase,hi) then
if close(md1) >=mbot*max(md1-1,mbase,hi) then
if close(md1) <=mtop*min(md1-1,mbase,lo) then
if close(md1) >=mbot*min(md1-1,mbase,lo) then

//prescan req
//if emovavg(md1,20,vol)>25000 then
//if Sharesfloat < 20 then
//if close(md1) >= 1.5 then
//if close(md1)<=5 then

//for spreadsheet analysis, close is at signal day
if mbtest = 3 then
println symbol,",",close(md1),",",mresult,",",mhit,",",m5gain,",",mloss;
endif;

//use for backtest printout
if mbtest = 2 then
println "symbol":-8,"dayX":15;
println "************************************************************************************";
println;
endif;

if mbtest =1 then
println symbol:-8,date(md1+1):10,open(md1+1):8:3,open(md1+4):8:3,
(open(md1+4)-open(md1+1))/open(md1+1):8:2;
endif;

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

endif;endif;endif;endif;endif;
//endif;endif;endif;endif;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