[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

'Trading the Trends' Indicator Conversion - Please Help



PureBytes Links

Trading Reference Links


>Can someone please convert this Metastock indicator to
>Easy Language?  Thank you in advance.
>
>
In looking back thru some old posts to this list, I ran across the following
code provided by T.L. several months ago. Thanks, T.L. I changed this to run
in SC2.1 using TC2000 data on CMB readjusted for a stock split. This is the
only data I have access to. This produced a graph quite close to that in the
Sept98 TASC, except the big spikes in the indicator don't seen quite right.
Don't know if its due to different data, maybe different inputs, or this
code is changing from up to down trend one day off. Anyway its a good
starting point. If anyone has other data to check this on, I'd appreciate
any comments. The CMB chart(Figure 1) in TASC is hard to read, whereas the
SP500 one minute bar chart ( figure 5) would be easier if anyone has that data.

Probably anyone reading the MIS or MIT Usenet groups noticed that A.
Abraham, a sometimes contributor to this list in the past, is selling his
TrendRider code at TrendRider.com for $790, introductory.

David

-----------------------------------------------------------------------------
input: length(21);
vars: WT(0), flag(0), TT(0), hi(0), lo(0), Hflag(0), chgflag(0);

WT=Waverage(TrueRange, length)*3;

if flag=0 then begin  {prolog - which side of market to start?}
    if c>average(c,length) then flag=1;
    hi=c;
    lo=c;
    flag=1;
end;

if Hflag=1 then begin
     if c>hi then hi=c;
     TT=hi-WT;
     if c<TT then begin
          lo=c;
          hflag=0;
          chgflag=1;
     end;
end;

if Hflag=0 and chgflag=0 then begin
     if c<lo then lo=c;
     TT=lo+WT;
     if c>TT then begin
          hi=c;
          hflag=1;
     end;
end;

chgflag=0;

plot1(TT,"AA-Trend");