Ehlers Indicators for TradeStation
For MT4, please go here:
topic8472604.html
For MT5, please go here:
mt5-ehler-s-indicators-t8474589.html
For NinjaTrader, please go here:
ehler-s-indicators-for-nt8-t8476335.html
Re: Ehlers Indicators for TradeStation
2John 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.
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).
Ehlers used MESA to identify and measure dominant market cycles.
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.):
Ehlers's Relevance to Forex Trading
The techniques pioneered by John Ehlers are particularly relevant in Forex because:
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.
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.
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.
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.
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:
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)
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
3The Reversion Index
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
------------------------------------------------------------------------------------------------
DOWNLOAD:
ReversionIndex.pdf
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;
DOWNLOAD:
ReversionIndex.pdf
Re: Ehlers Indicators for TradeStation
4PMA: projected moving average
TradeStation: March 2025
In “Removing Moving Average Lag” in this issue, John Ehlers introduces a projected moving average (PMA) designed to remove the lag inherent in moving averages. He does this by adding the slope times half the length of the average to the average itself. A function labeled $PMA is provided for the calculations. A sample chart displaying the PMA, the PMA slope, and its prediction, as discussed in Ehlers’ article.
TradeStation: March 2025
In “Removing Moving Average Lag” in this issue, John Ehlers introduces a projected moving average (PMA) designed to remove the lag inherent in moving averages. He does this by adding the slope times half the length of the average to the average itself. A function labeled $PMA is provided for the calculations. A sample chart displaying the PMA, the PMA slope, and its prediction, as discussed in Ehlers’ article.
Code: Select all
Function: $PMA
{
TASC MAR 2025
Projected Moving Average ($PMA) Function
(C) 2024 John F. Ehlers
}
inputs:
Price( numericseries ),
Length( numericsimple ),
PMA( numericref ),
Slope( numericref ),
SMA( numericref );
variables:
Count( 0 ),
Sx( 0 ),
Sy( 0 ),
Sxx( 0 ),
Syy( 0 ),
Sxy( 0 );
Sx = 0;
Sy = 0;
Sxx = 0;
Syy = 0;
Sxy = 0;
for Count = 1 to Length
begin
Sx = Sx + Count;
Sy = Sy + Price[Count - 1];
Sxx = Sxx + Count * Count;
Syy = Syy + Price[Count - 1] * Price[Count - 1];
Sxy = Sxy + count*Price[Count - 1];
end;
Slope = -(Length * Sxy - Sx * Sy) / (Length * Sxx - Sx * Sx);
SMA = Sy / Length;
PMA = SMA + Slope * Length / 2;
//Function Return Value
$PMA = 1;
Indicator: Projected Moving Average (PMA)
{
TASC MAR 2025
Projected Moving Average (PMA)
(C) 2024 John F. Ehlers
}
inputs:
Length( 20 );
variables:
ReturnValue( 0 ),
PMA( 0 ),
Slope( 0 ),
SMA( 0 ),
Predict( 0 );
ReturnValue = $PMA(Close, Length, PMA, Slope, SMA);
Predict = PMA + .5 * (Slope - Slope[2])*Length;
Plot1( PMA, "PMA" );
Plot2( Predict, "Predict" );
//Plot3( SMA, "SMA" )
Indicator: PMA Slope and Prediction
{
TASC MAR 2025
PMA Slope and Its Prediction
(C) 2024 John F. Ehlers
}
inputs:
Length( 20 );
variables:
ReturnValue( 0 ),
PMA( 0 ),
Slope( 0 ),
SMA( 0 ),
Predict( 0 );
ReturnValue = $PMA(Close, Length, PMA, Slope, SMA);
Predict = 1.5 * Slope - .5 * Slope[4];
Plot1( Slope, "Slope" );
Plot2( 0, "Zero Line" );
Plot3( Predict, "Predict" );