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: gonzongo who started this subject1/28/2001 9:56:51 PM
From: MechanicalMethod  Read Replies (3) of 12039
 
adaptAvg003

Var: len(8), adaptAvg(0), cSlope(0), avgSlope(0);

if c > c[1] then cSlope = 1;
if c < c[1] then cSlope = -1;

adaptAvg = average(c,len); {len last bar}
if adaptAvg > adaptAvg[1] then avgSlope = 1;
if adaptAvg < adaptAvg[1] then avgSlope = -1;

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

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;

adaptAvg = average(c,len); {updated len}

plot1(average(c,8),”avg8”); {for comparison}
plot2(adaptAvg,”adaptAvg”);

~~~~~~~~~~~~

Have to clear my head or look at other code to remember how array syntax works then store each bars result creating the non-series-parameter 1 line indicator. A non-linear price proxie with each point on the line = average(c,n) where n varies by adapting to conditions that make sense. Eventually -- slope of this simple 1 line price proxie will be a stand alone stop and reverse system. When it's that far along I'll switch the input signal average(c,n) to something better like (highest(H,n) + lowest(L,n))*.5.

Still a bug in which parameter levels to trigger increasing and decreasing. Learned I can’t follow code well running through an idea on SI rather than testing it for real. There’s value to me besides ego {which I leave out of this} in running through the logic of how a code project comes together for me. It advertises how I code. I encourage everyone serious about help with a code project PM me or post code and code ideas here then we will take discussion private just before it's $$.

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