+1 888 340 6572 GET STARTED

Cycle Analysis > D_ELI (Ehlers Leading Indicator)

Article/Author: Bill Mars, P.O. Box 231, St. Marys, OH 45885, FAX (419) 394-2165

Download: d_eli.ela

File Includes: Indicator > D_ELI (Ehlers Leading Indicator)

Category: Indicator > Cycle Analysis

Description:

TradeStation does not allow the user to make a Multi Data Chart with a Tick Bar Chart and any other type a chart. This Indicator plots a single Daily DSP (Detrended Synthetic Price) and a Daily ELI (Ehlers Leading Indicator) using intraday data.

Detrended Synthetic Price is a function that is in phase with the dominant cycle of real price data. This one is computed by subtracting a 3 pole Butterworth filter from a 2 Pole Butterworth filter. Ehlers Leading Indicator gives an advanced indication of a cyclic turning point. It is computed by subtracting the simple moving average of the detrended synthetic price from the detrended synthetic price.

Buy and Sell signals arise when the ELI indicator crosses over or under the detrended synthetic price.

See "MESA and Trading Market Cycles" by John Ehlers pages 64 - 70.

Usage:

The most popular method of using a cycle is to accurately predict events in nature: bird migrations, the tides, planetary movements, etc. One can also use cycle analysis to predict changes in financial markets, although not always with the accuracy found in nature.

The prices of many commodities reflect seasonal cycles. Due to the agricultural nature of most commodities, these cycles are easily explained and understood. However, for some securities, the cyclical nature is more difficult to explain. Theories as to why certain securities exhibit cyclical patterns range from weather and sun spots, to planetary movement and basic human psychology.

Everybody knows that prices are a consensus of human expectations. These expectations are always changing, shifting the supply/demand lines, and causing prices to oscillate between overbought and oversold levels. Fluctuations in prices are a natural process of changing expectations and lead to cyclical patterns.




Inputs:

Length - specifies the number of trailing bars to consider

EasyLanguage Code:
INPUT: LENGTH(7);

VARS: PRICE(0), EMA1(0), EMA2(0), ALPHA(.25), ALPHA2(.125),
D_HIGH(0), D_LOW(0), FIRSTDAY(TRUE);

IF DATE <> DATE[1] AND DAYOFWEEK(DATE[1]) <> 0 THEN BEGIN
PRICE = (D_HIGH + D_LOW) /2;
IF FIRSTDAY = TRUE THEN BEGIN
IF LENGTH > 2 THEN ALPHA = 2 / (LENGTH + 1)
ELSE ALPHA = .67;
ALPHA2 = ALPHA /2;
PRICE = (H[1]+L[1])/2;
EMA1 = PRICE;
EMA2 = PRICE;
VALUE2 = 0;
FIRSTDAY = FALSE;
END;
EMA1 = (ALPHA * PRICE) + ((1 - ALPHA) * EMA1);
EMA2 = ((ALPHA2) * PRICE) + ((1 - (ALPHA2)) * EMA2);
VALUE1 = (EMA1 - EMA2);
VALUE2 = (ALPHA * VALUE1) + ((1 - ALPHA) * VALUE2);
VALUE3 = VALUE1 - VALUE2;
PLOT1[1](VALUE1,"D_DSP");
PLOT2[1](VALUE3,"D_ELI");
PLOT3(0," ");
D_LOW = LOW;
D_HIGH = HIGH;
END;

IF HIGH > D_HIGH THEN D_HIGH = HIGH;
IF LOW < D_LOW THEN D_LOW = LOW;

{ALPHA IS THE CONSTANT FOR THE EMA FILTER.
WERE THE EMA RELATES TO THE SMA BY: ALPHA = 2 / (LENGTH + 1)
AS AN EXAMPLE SOME COMMON VALUES ARE:
ALPHA LENGTH
.50 3 DAYS
.40 4 DAYS
.25 7 DAYS
.20 9 DAYS
.182 10 DAYS
.133 14 DAYS
.118 16 DAYS
.095 20 DAYS
.069 28 DAYS}