MA Difference

MA Difference displays the difference between two moving averages as a graph. If the first moving average is above the second the value will be positive, otherwise the value will be negative. The user may change the inputs (close), methods (SMA), shift amounts and period lengths. This indicator’s definition is further expressed in the condensed code given in the calculation below.

MA Difference

How To Trade Using MA Difference

No trading signals are calculated for this indicator.

How To Access in MotiveWave

Go to the top menu, choose Study>General>MA Difference

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 close
//method = moving average (ma), user defined, default is SMA
//period1 = user defined, default is 10
//shift1 = user defined, default is 0
//input2 = price, user defined, default is close
//method2 = moving average (ma), user defined, default is SMA
//period2 = user defined, default is 5
//shift2 = user defined, default is 0
//index = current bar number

MA1 = ma(method, index+shift1, period1, input);
MA2 = ma(method2, index+shift2, period2, input2);
PlotHist: diff = MA1 - MA2;