MetaStock™ Zone Forum & FAQ Artykuły Linki Elliott Waves EasyLanguage™ Zone

 A B C D E F G H I J K L M N O P R S T U V W Y Z #

Modified Optimum Elliptic Filter and Detrender by John Ehlers

Re: EasyLanguage to Metastock conversion

* To: <metastock@xxxxxxxxxxxxx>
* Subject: Re: EasyLanguage to Metastock conversion
* From: "C.S." <csaxe@xxxxxxxxxxx>
* Date: Wed, 7 Mar 2001 15:18:45 -0800
* References: <200103072029.NAA28072@xxxxxxxxxxxxxxxxxx>
* Sender: owner-metastock@xxxxxxxxxxxxx

----- Original Message -----
From: "Jeff Haferman" <haferman@xxxxxxxxxxxxxxxxxxxxxxx>
To: <metastock@xxxxxxxxxxxxx>
Sent: Wednesday, March 07, 2001 7:20 AM
Subject: Re: EasyLanguage to Metastock conversion

> Dave,
> Thanks, I tried your code in MS 6.52, and it plots, but
> does not seem correct. The original EasyLanguage code is:
>
> Value1 = Close + 0.088*Value1[6];
> Value2 = Value1 - Value1[6] + 1.2*Value2[6] - 0.7*Value2[12];
> D = Value2[12] - 2*Value2[6] + Value2;
> Plot1(D,"D");
>
> So I modified yours to read
> Value1:=0.088*Ref(PREV,-6)+CLOSE;
> Value2:=(1.2*Ref(PREV,-6))-(0.7*Ref(PREV,-12));
> V3:=ROC(Value1,6,\$)+Value2;
> D:=Ref(V3,-12)-2*Ref(V3,-6)+V3;
> D;

This seems like it's correct, and it does plot, but I don'thave any EasyLanguage numbers to compare to. I wrote up a C program to perform the computation, and the shape of the resulting plot seems identical to what metastock gives, but the actual numbers are off. Your line of thinking seems to me to be correct, however. I'll try to do some more verfication.

Jeff

Jeff,
I worked on this for a time last July. Incorporating Dave's improvements, I came up with the following for Ehlers code for the modified optimum elliptic filter and detrender as described on p.29. Although I'm not impressed with the output, this may be something you can use.

-Corey.

Modified Optimum Elliptic Filter and Detrender

{Ehlers TASC Jul 00, p. 29}
P1:=(H+L)/2;
V1:=P1 + 0.088*Ref(PREV,-5);
V2:=ROC(V1,6,\$) + 1.2*Ref(PREV,-5) - 0.7*Ref(PREV,-11);
D1:=Ref(V2,-12) - (2*Ref(V2,-6))+V2;

S1:=0.13785*(2*D1-Ref(D1,-1))+0.0007*(2*Ref(D1,-1)-
Ref(D1,-2))+0.13785*(2*Ref(D1,-2)-
Ref(D1,-3))+(1.2103*PREV)-(0.4867*Ref(PREV,-1));

S2:=0.13785*(2*S1-Ref(S1,-1))+0.0007*(2*Ref(S1,-1)-
Ref(S1,-2))+0.13785*(2*Ref(S1,-2)-
Ref(S1,-3))+1.2103*PREV-0.4867*Ref(PREV,-1);
S1;
S2

Source / From: TOP
http://purebytes.com/archives/metastock/

Equis and MetaStock® and MetaStock Professional® are registered trademarks of Equis International. Achelis Binary Wave®, The DownLoader®,
Expert Advisor®, OptionScope®, Quotecenter® and Smart Charts® are trademarks of Equis International, a Thomson Reuters company.

TradeStation® Pro, TradeStation® 2000i, OptionStation®, SuperCharts®, PowerEditor® and EasyLanguage®
are registered trademarks of TradeStation Technologies, Inc. Other names and marks referred to are the property of their respective owners.

All information provided on this website is for educational purposes only. Trading involves risk, including possible loss of principal and other losses.

Ten i inne materiały na tej stronie zostały zamieszczone zostały jedynie w celach edukacyjnych, nie ponoszę żadnej odpowiedzialno¶ci za ich stosowanie.

Gra na giełdzie i rynkach walutowych (FOREX) niesie ze sob± ryzyko poważnych strat finansowych!