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: Bob Jagow who wrote (6813)9/24/1998 10:08:00 PM
From: TechTrader42  Read Replies (1) of 11149
 
You can change all sorts of things in the scan to specify what sort of cup you want. I haven't spent enough time with it yet, because I just came up with the scan this afternoon. But I've tried some with more base points, wider bases, narrower bases, etc. Pointb is the base, but a two-point base can be created, too.

You can change the depth of the base, too, with the percentages I included. Martinelli and Hyman didn't say much about the depth. I decided to have the rims at least 12% higher than the base, but not more than 45% higher. I think it would have been better to work down from the rims, taking at least 12% off to get to the base. In my usual hurry, I reversed it. I've fixed it below:

//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="cuph.lst";
input="cup.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 pointb<=.88*pointc then
if pointb>.55*pointc then
if pointb<=.88*pointa then
if pointb>.55*pointa 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