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: Jan Robert Wolansky who wrote (5194)7/5/1998 5:41:00 PM
From: TechTrader42   of 11149
 
You wrote: Brooke, thanks. I've tried to add the language to run for the last 10 days, but I can't seem to figure it out.

It's defeating me, too. I can't seem to get the right values for the 10 days back, when I add another for loop that subtracts "j" from "i." The long way to do it would be to create slopes for all 10 days, (b, bb, bbb, bbbb, etc.) But I'll keep trying the for loop for a while. Maybe Bob has some suggestions. If you did want to do it the long way, the next day back (-2) would involve adding:

Sybb := Sybb + close(i-2);
Sxybb := Sxybb + i*close(i-2);
bbb := (S*Sxybb - Sx*Sybb)/(S*Sxx - Sx*Sx);//Yesterday's slope

Then you'd not only look for when b>bb, but for when bb>bbb. And so on with Sybbb, Sxybbb, bbbb, etc.

But that is kludging to the factor of 10. I'll have to look at my daysback for loop some more to figure out where I went wrong ("Where did I go wrong in life!?")

You'd think the new variable "j" would work easily enough if you add to everything something like:

Syb := Syb + close(i-1-j);

But so far, no luck. I'll try looping the loop again later tonight. Barnstormin', ya know.

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