PureBytes Links
Trading Reference Links
|
Clyde:
Thanks for the Ehlers function..
I only found the function transfered with the ela, however. Was the
indicator that draws the ITL included under a name other than the ela name?
Would you consider including a system example also, using the function, as
a starting point for non experts?
Don
----- Original Message -----
From: Clyde Lee
To: FrankKaeb@xxxxxxx ; List Code List
Cc: realtraders@xxxxxxxxxxxxxxx
Sent: Sunday, April 16, 2000 9:22 PM
Subject: Re: CL_EL help with recent TASC article
The attached .gif file shows a set of channels around a
Gann trend calculated as previously described.
The Magenta line wandering within this channel is the result
of a computation based on Ehler's INSTANTANEOUS TREND computation
from his article in May TASC magazine.
The code follows and initially came from the TASC site.
A slight modification -- I added a parameter called SMOOTH which
allows us to modify the Period computation within the function
to reduce the lag (value of less than 100) or increase the reliability
of the period length estimate (value greater than 100).
Ehler's approach is an interesting way of determining the length
of the dominant cyclic elements in a price series and removal of
such by use of simple averaging.
Read carefully what he has to say about LAG/DELAY before jumping
off into a never, never, land.
The attached .ela was written in TS2000i and has not been
checked out in TS4 or SC so be careful. This is just a function
to compute the InstantaneousTrendline defined by Ehler.
It was interesting to compare the results of this method to
a simple T3 average and to the Kauffman Adaptive average.
With sufficient "smoothing" it is interesting to note how a
system that is basically Aberration (but using the Ehler IT
function to compute an average) behaves on a comparative basis
to a simple and an adaptive average.
Clyde
{
Instantaneous Trend Line
Ehlers uses a two-mode market model: trending or cycling. By
removing the
dominant cycle from the price data, the remaining information is mostly
about trend. Here is the EasyLanguage Code to plot Instantaneous Trend Line.
Since the estimation of period of cyclic phenomena may be suspect, the
user is provided a Smooth input which allows the user to specify the
percentage of the computed Period to use for averaging to determine trend.
A Value of 100 yields the original Ehler results.
}
Inputs: Price(NumericSeries),Smooth(NumericSimple);
Vars: InPhase(0), Quadrature(0), Phase(0), DeltaPhase(0),
count(0), InstPeriod(0), Period(0), Trendline(Price),
NewPrice(Price);
Vars: SmoothFact(iff(Smooth>0,Smooth*.01,1));
{If CurrentBar > 5 then begin}
{Compute InPhase and Quadrature components}
Value1 = Price - Price[6];
Value2 =Value1[3];
Value3 =.75*(Value1 - Value1[6]) + .25*(Value1[2] - Value1[4]);
InPhase = .33*Value2 + .67*InPhase[1];
Quadrature = .2*Value3 + .8*Quadrature[1];
{Use ArcTangent to compute the current phase}
If AbsValue(InPhase +InPhase[1]) > 0 then Phase =
ArcTangent(AbsValue((Quadrature+Quadrature[1]) / (InPhase+InPhase[1])));
{Resolve the ArcTangent ambiguity}
If InPhase < 0 and Quadrature > 0 then Phase = 180 - Phase;
If InPhase < 0 and Quadrature < 0 then Phase = 180 + Phase;
If InPhase > 0 and Quadrature < 0 then Phase = 360 - Phase;
{Compute a differential phase, resolve phase wraparound, and limit delta
phase errors}
DeltaPhase = Phase[1] - Phase;
If Phase[1] < 90 and Phase > 270 then DeltaPhase = 360 + Phase[1] - Phase;
If DeltaPhase < 1 then DeltaPhase = 1;
If DeltaPhase > 60 then Deltaphase = 60;
{Sum DeltaPhases to reach 360 degrees. The sum is the instantaneous
period.}
InstPeriod = 0;
Value4 = 0;
For count = 0 to 60 begin
Value4 = Value4 + DeltaPhase[count];
If Value4 > 360 and InstPeriod = 0 then begin
InstPeriod = count;
end;
end;
{Resolve Instantaneous Period errors and smooth}
If InstPeriod = 0 then InstPeriod = InstPeriod[1];
Value5 = .25*(InstPeriod) + .75*Period[1];
{Compute Trendline as simple average over the measured dominant cycle
period}
Period = IntPortion(Value5*SmoothFact);
If Period>MaxBarsBack-5 then Period=MaxBarsBack-5;
Trendline = 0;
For count = 0 to Period {+ 1} begin
Trendline = Trendline + Price[count];
end;
If Period > 0 then Trendline = Trendline / (Period + 1{2});
{Value1=T3Average(Trendline,5);}
NewPrice = .33*(Price + .5*(Price - Price[3])) + .67*NewPrice[1];
if CurrentBar < 26 then begin
Trendline = Price;
NewPrice = Price;
End;
{Trendline=T3Average(Trendline,Smooth);}
{Trendline=Trendline+(NewPrice-Trendline)*Smooth*.01;}
{end;}
Ehler_Instant_Trend = Trendline;
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Clyde Lee Chairman/CEO (Home of SwingMachine)
SYTECH Corporation email: <clydelee@xxxxxxx>
7910 Westglen, Suite 105 Work: (713) 783-9540
Houston, TX 77063 Fax: (713) 783-1092
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
To subscribe / unsubscribe from SwingMachine list
http://www.egroups.com/list/swingmachine/
After joining list the freeware SwingMachine program
(DOS Version) is available in the VAULT at:
http://www.egroups.com/list/swingmachine/
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
----- Original Message -----
From: <FrankKaeb@xxxxxxx>
To: <code-list@xxxxxxxxxxxxx>
Sent: Monday, April 10, 2000 14:05
Subject: CL_EL help with recent TASC article
> Does anyone have the EL code in .ELA format for the recent article by
Ehlers
> about Hilbert transformation and instantaneous trendlines?
>
> Frank
> ---------------------------------
> Subscribe/Unsubscribe at
> http://www.markbrown.com/list.htm
>
|