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: TechTrader42 who wrote (6809)9/24/1998 6:51:00 PM
From: TechTrader42   of 11149
 
Already one small correction -- a typo mixing up pointa and pointb in the conditions. Use this one:

//Cup and Handle Scan, by Brooke Elise Nagler,
//based on "Cup-With-Handle and the Computerized Approach
//by Rich Martinelli and Barry Hyman in October 1998 issue of TASC

output="cup.lst";
input="commplus.lst";
DaysRequired=200;
Daystoload=250;

integer i, j, k, l, datea, dateb, datec, dated;
float pointa, pointb, pointc, pointd;

pointd:=min(0,-14,lo);
pointc:=max(-5,-30,hi);
pointb:=min(-8,-55,lo);
pointa:=max(-28,-155,hi);

dated:=0;
datec:=0;
dateb:=0;
datea:=0;
for i = -14 to 0 step 1 do
if low(i)=pointd then
dated:=i;
endif;
next i;
for j = -30 to -5 step 1 do
if high(j)=pointc then
datec:=j;
endif;
next j;
for k = -55 to -8 step 1 do
if low(k)=pointb then
dateb:=k;
endif;
next k;
for l = -155 to -28 step 1 do
if high(l)=pointa then
datea:=l;
endif;
next l;

if pointc>1.12*pointb then
if pointc<1.45*pointb then
if pointa>1.12*pointb then
if pointa<1.45*pointb then
if pointc>=.95*pointa then
if pointd<(.8*pointc)+(.2*pointb) then
if datea< dateb then;
if dateb< datec then;
if datec< dated then;
if datea-dateb<=-20 then
if datea-dateb>=-120 then
if dateb-datec<=-3 then
if datec-dated<=-5 then
println symbol, ", ", pointa:5:2, ", ", pointb:5:2, ", ", pointc:5:2,
", ", pointd:5:2, ", ", "Date A: ", date(datea), ", ",
"Date B: ", date(dateb), ", ", "Date C: ", date(datec), ", ",
"Date D: ", date(dated), ", ", "Dates A-B: ", datea-dateb,
", ", "Dates B-C: ", dateb-datec, ", ", "Dates C-D: ", datec-dated;
endif; endif; endif; endif; endif; endif;
endif; endif; endif; endif; endif; endif;
endif;

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