Re: Ehlers Indicators for TradeStation

2
John Ehlers is a highly respected figure in the world of technical analysis, particularly known for his innovative application of digital signal processing (DSP) concepts to financial time series data, which is heavily used in Forex trading.

His work focuses on treating price data like a signal and using filters, transforms, and cycles theory to isolate true market movement from noise. He is often credited with popularizing the idea that cycles and spectral analysis are critical to understanding and predicting price action.

đź’ˇ Key Contributions and Concepts

Ehlers's work is based on several advanced mathematical techniques, most notably:

1. Digital Signal Processing (DSP) and Filtering
Ehlers views the market as a noisy signal that needs to be "filtered" to reveal underlying trends and cycles.
  • Lag Reduction: Traditional moving averages (MAs) suffer from significant lag, causing late entry and exit signals. Ehlers developed filters that minimize this lag.
  • Decycler and Roofing Filter: He created unique filters designed to remove long-term cycles (Decycler) or to isolate specific high-frequency cycles (Roofing Filter), allowing traders to see the price action between specific frequency bands.
2. The Fisher Transform
Perhaps his most famous contribution is the Fisher Transform. This mathematical technique converts the price data (which is generally assumed to have a non-normal distribution) into a distribution that is approximately Gaussian (normally distributed).
  • How it Works: By normalizing the price data, Ehlers claimed he could reliably identify price extremes and turning points. The resulting indicator oscillates between upper and lower extremes, making trend changes very clear.
3. Maximum Entropy Spectral Analysis (MESA)
Ehlers used MESA to identify and measure dominant market cycles.
  • Cycle Identification: MESA is a technique for estimating the power spectral density of a signal. In trading, this means it can pinpoint the most powerful and regular price cycle currently influencing the market (e.g., a 20-bar cycle, a 40-bar cycle, etc.).
  • Adaptive Indicators: Once the dominant cycle is known, Ehlers suggested creating "adaptive" indicators, such as adaptive moving averages, whose lookback period automatically adjusts to match the dominant cycle length. This makes the indicator highly responsive to current market conditions.
4. Zero-Lag and Adaptive Indicators
Many of the indicators Ehlers has published are modifications of traditional tools, but with the lag drastically reduced or eliminated, making them ideal for the fast-paced Forex market:
📚 Notable Publications
Ehlers has authored several foundational books that explain how to apply these DSP methods using standard trading platforms (MQL4/MQL5, EasyLanguage, etc.):
  • Cybernetic Analysis for Stocks and Futures (2004)
  • MESA and Trading Market Cycles (2008)
  • Cycle Analytics for Traders (2013)
  • Predictive Models for Trading Systems (2017)
📌 Ehlers's Relevance to Forex Trading

The techniques pioneered by John Ehlers are particularly relevant in Forex because:
  • Fast Execution: Forex pairs often require very fast entry and exit to capture small moves. Ehlers's focus on lag elimination provides a competitive edge over standard lagging indicators.
  • Noise Reduction: Forex markets are frequently characterized by high levels of short-term noise and choppiness. His use of Digital Filters helps traders see the underlying trend through the volatility.
  • Cycle Dominance: Currency pairs are often influenced by predictable economic and calendar cycles (e.g., London open, New York close). MESA provides a mathematical basis for exploiting these periodic patterns.

Re: Ehlers Indicators for TradeStation

3
The Reversion Index
Image


TradeStation: January 2026

In John Ehlers’ article in this issue, “The Reversion Index,” he presents an indicator that produces timely buy and sell signals for mean-reversion strategies by summing bar-to-bar price changes and normalizing them by their absolute values. He explains that the summation should cover about half of the dominant cycle in the data, and that peaks and valleys are identified by the crossings of two SuperSmoother filters with different lengths. The reversion index is a normalized sum of price differences that oscillates between -1 and +1.

EasyLanguage code for the reversion index is shown here. A sample chart of the reversion index is shown in the picture below.

For NinjaTrader indicator, please go here:
post1295577759.html#p1295577759

For MT4 indicator, please go here:
post1295577763.html#p1295577763

For MT5 indicator, please go here:
post1295577762.html#p1295577762

Code: Select all

{
	TASC JAN 2026
	Reversion Index
	(C) 2005 John F. Ehlers
}

inputs:
	Length( 20 );
	
variables:
	DeltaSum( 0 ),
	AbsDeltaSum( 0 ),
	Count( 0 ),
	Ratio( 0 ),
	Smooth( 0 ),
	Trigger( 0 );

DeltaSum = 0;
AbsDeltaSum = 0;

for Count = 0 to Length - 1 
begin
	DeltaSum = DeltaSum + Close[Count] - Close[Count + 1];
	AbsDeltaSum = AbsDeltaSum + AbsValue( Close[Count] 
	 - Close[Count + 1] );
end;

if AbsDeltaSum <> 0 then 
	Ratio = DeltaSum / AbsDeltaSum;

Smooth = $SuperSmoother( Ratio, 8 );
Trigger = $SuperSmoother( Ratio, 4 );

Plot1( Smooth, "Smooth" );
Plot2( 0, "Zero" );
Plot3( Trigger, "Triger" );

Function: $SuperSmoother

{
	SuperSmoother Function
 	(C) 2025 John F. Ehlers
}

inputs:
	Price(numericseries),
	Period(numericsimple);

variables:
	a1( 0 ),
	b1( 0 ),
	c1( 0 ),
	c2( 0 ),
	c3( 0 );

a1 = ExpValue(-1.414 * 3.14159 / Period);
b1 = 2 * a1 * Cosine(1.414 * 180 / Period);
c2 = b1;
c3 = -a1 * a1;
c1 = 1 - c2 - c3;

if CurrentBar >= 4 then 
	$SuperSmoother = c1*(Price + Price[1]) / 2 
	 + c2 * $SuperSmoother[1] + c3 * $SuperSmoother[2];
if CurrentBar < 4 then 
	$SuperSmoother = Price;