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 (3080)1/15/1998 7:33:00 PM
From: Gale A. Thompson  Read Replies (3) of 11149
 
Hi Brook,

"Here it is: A much shortened formula for slope of dahl that allows you to put in any period you want:"

What an excellant scan! I was playing with it a bit... When I run the scan, all of the stocks print out with their slopes. How would I filter for a particular value of the slope?

Thank you,

-- Gt --

P.S. I have modified your scan to adjust for a particular slop output... Here it is in case someone else is interested...:

output = "dalslope.lst";

issuetype common;
Daystoload = 500;

float f, q, dahl, dahla, dahlb, dalslope, Sxy, Sy;
integer S, Sx, Sxx, i, j, r;

S := 13; //S is the number of days for the slope

f:=0;
q:=0;
for j=0 to -(S-1) step -1
do
f := f + (MovAvg(j,50,cl)- MovAvg(j-15,50,cl)); //f + MovAvg(j,50,cl);
next j;

q:=0;
for r=0 to -(S-1) step -1
do
q := q+(r*(MovAvg(r,50,cl)-MovAvg(r-15,50,cl)));
next r;

Sx := 0;
Sxx := 0;
//Sxy := 0;
//Sy := 0;
for i = 1 - S to 0 do
Sx := Sx + i;
Sy := f;
Sxx := Sxx + i*i;
Sxy := q;
next i;
dalslope := (S*Sxy - Sx*Sy)/(S*Sxx - Sx*Sx);
If dalslope > 0.25 AND //Defining a particular slope.
dalslope < 0.50 Then
println symbol,",",close(0):8:2,",",dalslope:8:4;
EndIf;
Report TOU ViolationShare This Post
 Public ReplyPrvt ReplyMark as Last ReadFilePrevious 10Next 10PreviousNext