Variable Moving Average(VARMA)

Custom MT4 expert advisors published here.

Moderator: admin

Variable Moving Average(VARMA)

Postby Alexander.Gettinger » Fri Jun 29, 2012 1:52 pm

Original indicator: viewtopic.php?f=17&t=3521

Variable moving average is an exponential moving average that automatically adjusts the smoothing constant based on the volatility of the data series. The more volatile the data, the larger the smoothing constant used in the moving average calculation. The larger the smoothing constant, the more weight given to the current data. The opposite is true for less volatile data.

Typical moving averages suffer from the inability to compensate for changes in volatility. During volatile markets, you want a moving average to increase its sensitivity, so that you will quickly be on the correct side of any wild gyrations. By automatically adjusting the smoothing constant, a variable moving average is able to adjust its sensitivity, allowing it to perform better in both high and low volatility markets.


Formulas:
AbsCMO:=(Abs(CMO(Close,CMOPeriod)))/100;
SC:=2/(SmoothPeriod+1);
if period > CMOPeriod + SmoothPeriod+ 2 then
VARMA=(SC*AbsCMO*C)+(1-(SC*AbsCMO))*VARMA[PREV]);
else
VARMA = Close
end

VARMA_MQL.PNG


Download:
VARMA.mq4
(1.71 KiB) Downloaded 1373 times


For VARMA must be installed CMO oscillator (viewtopic.php?f=38&t=20681).
Alexander.Gettinger
FXCodeBase: Confirmed User
 
Posts: 3785
Joined: Wed Mar 31, 2010 9:40 pm
Location: Russia, Omsk

Return to MT4 Expert Advisors

Who is online

Users browsing this forum: No registered users and 13 guests