Signal To Noise Ratio
The Signal To Noise Ratio was authored by John Ehlers; it is derived from his Hilbert Transform Indicator. Highs, lows, Euler’s logarithms, factors and feedback are applied to Hilbert’s complex number calculations to produce this indicators amplitude value. The user may change the input (midpoint) and Hilbert period length. This indicator’s definition is further expressed in the condensed code given in the calculation below.
Click here for more information on Ehler’s indicators.
Click here for more information on the Hilbert Transform Indicator
How To Trade Using the Signal To Noise Ratio
The Signal To Noise Ratio may be used in conjuction with other indicators. No trading signals are calculated in this study.
How To Access in MotiveWave
Go to the top menu, choose Study>John Ehlers>Signal To Noise Ratio
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
//input = price, user defined, default is midpoint price
//Hilbert period = user defined, default is 7
//quad = quadrature = imaginary part of complex number
//inPhase = real part of complex number
//amp = amplitude
//index = current bar number
iMult = .635; qMult = .338; priorPrice = price[index-period]; //v1 = detrend price v1 = price - priorPrice; high = series.getHigh(index); low = series.getLow(index); prevRange = range[index-1]; range = (.2 * (high - low)) + (.8 * prevRange); v2 = v1[index-2]; v4 = v1[index-4]; inPhase3 = inPhase[index-3]; quad2 = quad[index-2]; //Hilbert transform complex number components, inPhase (real part), quad (imaginary part) inPhase = 1.25 * (v4 - (iMult*v2) + (iMult*inPhase3)); quad = v2 - (qMult*v1) + (qMult*quad2); prevV2 = v2[index-1]; //smoothed signal amplitude v2 = .2 * (inPhase * inPhase + quad * quad) + .8 * prevV2; prevAmp = amp[index-1]; //smoothed SNR in decibels if (v2 lessThan .001) v2 = .001; if (range lessThan 0) amp = .25 * (10 * Math.log(v2/(range*range))/Math.log(10) + 1.9) + .75 * prevAmp; endIf Plot amp;