Detrended Synthetic Price

Detrended Synthetic Price (DSP) was authored by Bill Mars. The DSP uses highs, previous high, lows, previous lows and feedback to create two exponential moving averages. The DSP is plotted as their difference. The period length is used but in a non traditional way. The user may change only this period length. This indicator’s definition is further expressed in the condensed code given in the calculation below.

Detrended Synthetic Price

How To Trade Using The Detrended Synthetic Price

Detrended Synthetic Price may be used in conjunction with other indicators. No trading signals are given.

How To Access in MotiveWave

Go to the top menu, choose Study>Bill Mars>Detrended Synthetic Price

or go to the top menu, choose Add Study, start typing in this study name until you see it appear in the list, click on the study name, click OK.

Important Disclaimer: The information provided on this page is strictly for informational purposes and is not to be construed as advice or solicitation to buy or sell any security. Please see our Risk Disclosure and Performance Disclaimer Statement.

Calculation

//period = user defined, default is 14
//prev = previous, index = current bar number

prevHigh = high[index-1];
prevLow = low[index-1];
if (prevHigh moreThan high) high = prevHigh;
if (prevLow lessThan low) low = prevLow;
price = (high + low) / 2;
alpha = .67;
if (period moreThan 2) alpha = 2 / (period + 1);
prevEma1 = ifNull(price, ema1[index-1]); //returns price on first try
ema1 = (alpha * price) + ((1 - alpha) * prevEma1);
prevEma2 = ifNull(price, ema2[index-1]);
ema2 = ((alpha/2) * price) + ((1 - (alpha/2)) * prevEma2);
Plot: dsp = ema1 - ema2;