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 (5182)7/5/1998 11:02:00 AM
From: Jan Robert Wolansky  Read Replies (1) of 11149
 
Brooke, I am trying to incorporate Bob Jagow's slope formula into a scan I'm doing and need some of your expert help. If I want to identify stocks whose 21-day linregslope is greater than the prior day, and I want to run the scan for, say, the last 10 trading days, how do I modify Bob's scan (which I've already adjusted to 21 days from 14):

issuetype common;
Daystoload=50; //needed for R2 bug!!!
integer i, S, Sx, Sxx;
float b, Sxy, Sy;
S := 21;
Sx := 0;
Sxx := 0;
Sxy := 0;
Sy := 0;
for i = 1 - S to 0 do
Sx := Sx + i;
Sy := Sy + close(i); //kills println wo d2ld
Sxx := Sxx + i*i;
Sxy := Sxy + i*close(i); //kills println wo d2ld
//Sxy := Sxy + i*close(0);
next i;
b := (S*Sxy - Sx*Sy)/(S*Sxx - Sx*Sx);

Thanks in advance, Jan
Report TOU ViolationShare This Post
 Public ReplyPrvt ReplyMark as Last ReadFilePrevious 10Next 10PreviousNext