Removing the lag of a Moving Average: the Projected Moving Average

Category: Indicators By: Violet Created: February 21, 2025, 1:01 PM
February 21, 2025, 1:01 PM
Indicators
0 Comments

John F. Ehlers proposes to a new solution to “Remove a Moving Average Lag” in the March 2025 issue of Trader’s Tips.

He explains that the average price in a time series average represents a statistical estimate for a block of price values, where the estimate is positioned at the block’s centre on the time axis. In the case of a simple moving average (SMA), the calculation moves the analysed block along the time axis and computes an average after each new price point. Because the average’s position is at the centre of each block, the SMA, by definition, lags behind price changes by half the data length.
To remove/mitigate this lag, Ehlers proposes a new projected moving average (PMA). He does this by adding half the data length of a block to the simple moving average using the data’s linear regression slope.

This is easy to implement in ProRealtime:

//
length = 10
//

slope = LinearRegressionSlope[ length ]( close )
projection = slope * length / 2
sma = average[ length ]( close )
pma = sma + projection

return pma, sma

 

Download
Filename: pma.itf
Downloads: 75
Violet Master
This author is like an anonymous function, present but not directly identifiable. More details on this code architect as soon as they exit 'incognito' mode.
Author’s Profile

Comments

Logo Logo
Loading...