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 : Technical Analysis - Beginners

 Public ReplyPrvt ReplyMark as Last ReadFilePrevious 10Next 10PreviousNext  
To: MechanicalMethod who wrote (11058)1/28/2001 10:28:09 PM
From: MechanicalMethod   of 12039
 
Another logic bug or at least it looked like it when I attempted to reduce redundancies to something less processor intensive and more visually intuitive. IOW, I saw a way to simplify it but then saw a bug and decided not tonight.

if (c >adaptAvg and avgSlope<0) or (c<adaptAvg and avgSlope>0) then begin
…. if cSlope > 0 and len > 3 and len < 21 then len = len - 1;
…. if cSlope < 0 and len > 3 and len < 21 then len = len - 1;
end

~~~~~~~~~~~
fix would be somewhat of a mirror image of the following concept but susbstitute the variables used above.

If len < 8 then begin
… if c > adaptAvg and cSlope > 0 and avgSlope > 0 then len = len +1;
… if c < adaptAvg and cSlope < 0 and avgSlope < 0 the len = len +1;
end;
Report TOU ViolationShare This Post
 Public ReplyPrvt ReplyMark as Last ReadFilePrevious 10Next 10PreviousNext