PureBytes Links
Trading Reference Links
|
Hey Andy,another great post,whether tradeable in rt or not! :^))
Thanks,
Carl
Andy wrote:
>
> ...you'd find something interesting in TASC. Most of the time it's fluff.
> But I got lucky with the July 2000 issue.
>
> John F. Ehlers wrote an article, "Optimal Detrending", in the July 2000
> issue. I took his indicators and used them as a filter in combination with
> my version of a smoothed stochastic. I've attached the ELA and a GIF file
> showing the equity curve. The equity curve can be smooth out further with
> the right set of money management and exit techniques. As it stands now, the
> equity curve is jerky but rising steadily at nearly a 45 degree angle.
>
> The 2 filters are 2 functions named Ehlers_MOEF and Ehlers_DT, with the
> Ehlers_MOEF calling on the Ehlers_DT to detrend the price series. If the DT
> is greater than the MOEF, then it's ok to go long. If the DT is below the
> MOEF, it's ok to go short. We then use the smooth stochastic to enter or
> exit the trade.
>
> $250 slippage, $20 commision.
>
> --------------------------------------------------------
>
> {Function: Ehlers_DT}
> Inputs: Lbck(Numeric);
> Vars: Price(0);
>
> Price=(H+L)/2;
> Value1=Price + 0.088*Value1[Lbck];
> Value2=Value1 - Value1[Lbck] + 1.2*Value2[Lbck] - 0.7*Value2[2*Lbck];
> Ehlers_DT=Value2[2*Lbck]-2*Value2[Lbck]+Value2;
>
> ---------------------------------------------------------
>
> {Function: Ehlers_MOEF}
> Inputs: Lbck(Numeric);
> Vars: DT(0);
>
> Dt=Ehlers_DT(Lbck);
> Ehlers_MOEF=0.13785*(2*DT-DT[1]) + 0.0007*(2*Dt[1]-Dt[2]) +
> 0.13785*(2*DT[2]-Dt[3]) + 1.2103*Ehlers_MOEF[1]-0.4867*Ehlers_MOEF[2];
>
> ---------------------------------------------------------
>
> {Function: AD_Stoch}
> Input: Lbck(NumericSeries),Len(NumericSeries);
> Vars: Upper(0),Lower(0),tot(0),Fac(0),Xavg(0);
>
> Upper=c-lowest(low,Lbck);
> Lower=Highest(H,Lbck)-Lowest(L,Lbck);
>
> If Lower<>0 then Tot=Upper/Lower;
>
> If Len+1<>0 then begin
> if CurrentBar<=1 then begin
> Fac=2/(Len+1);
> Xavg=Tot;
> end
> else
> Xavg=Fac*Tot+(1-Fac)*Xavg[1];
> end;
>
> AD_Stoch=Xavg;
>
> ---------------------------------------------------------
>
> {System: AD_Combine SPX}
> Inputs: Lbck(41),R(17),S(7),Q(6);
> Vars: Dt(0),Smth(0),Mo(0),Avg(0),Mp(0);
>
> Dt=Ehlers_DT(Lbck);
> Smth=Ehlers_Moef(Lbck);
> Mo=AD_Stoch(R,S);
> Avg=Xaverage(AD_Stoch(R,S),Q);
> Mp=MarketPosition;
>
> If MP<>1 and DT > Smth and Mo crosses above Avg then buy on close;
> If MP=1 and Mo crosses below Avg then exitlong on close;
> If MP<>-1 and DT < Smth and Mo crosses below Avg then sell on close;
> If MP=-1 and Mo crosses above Avg then exitshort on close;
>
> ------------------------------------------------------------------------
> Name: combine.ela
> combine.ela Type: ELA File (application/x-unknown-content-type-ela_auto_file)
> Encoding: base64
>
> Name: snap.gif
> snap.gif Type: GIF Image (image/gif)
> Encoding: base64
|