Education

The “Moving average” indicator (for professionals)


    In this article, we will focus on the accurate professional setting and calculations of the indicator “Moving Average”.

    The Calculation Formula


    This is the general formula for calculating of the moving average:

    https://lh4.googleusercontent.com/0TPoneKCR7ZTx_hyBa7mIzcKr-cFUGE3dKBipk9I8LJiJacaXdNCjmIccXVx3m5V9kxldlMZK4u9ajZA2QLfimNvrpexAqghzWrJ3vmbhgXsZeNHZOcTa4XSZG8f3X5Bou5ywX-5

    Where: https://lh6.googleusercontent.com/cxlCcXFBzlkFrvUiLU5OdlGcV3ZBCN6AW3x-9spG0wGnaZMkJ3FBH1AH9oaOzh-TUmjKIac0ZcmrdZ7dzYiSXXJEfDqCH-YgzFIbTUBq1wZ8_6c6uxPiwgf0R47zWTHSjokh502p — the value of the weighted moving average at the point t;

    • n —he number of values of the original function for the calculation of the moving average;
    • https://lh6.googleusercontent.com/AbF-4dh6sl4jMC11jcXsiSpFhgkynHT8ihe32wFWkWjzC9TdpPj0zvLQCGARzsrUv68KrliYzGQyry9eJe20phl5CSrirCSrNMNnUZ3B5IYO5WhwL7xSCQZat2iANAYGFiq-YX_h — the normalized weight (weighting coefficient) of the t-i value of the initial function;
    • https://lh4.googleusercontent.com/U1Iqy2AyA5jHlVICsOcn0WTheDPQIq_G5Tpdlv_dNrrhYLfTnzbkG3X3eVLjTLYzE88eXc3fXAUzVDXAmk2xFIXBNdJlhjGRGeH_T7ZGL1wvU7eMD30s-VominT7dRZZydnrrfYH — the value of the original function at the time i intervals remote from the current time.

    Normalizing of the weighting coefficients means that: https://lh5.googleusercontent.com/844RJFWyml2rep9vkY52HqZ1yw_FMP1v-RZKNMl4YMnfuu1UnhchScbH7S5WaZ5qr8pWiiwlDHqHcfx94X_bk0SVUxEyHBrTH1SkAu1JhzFZyOAcv0_p0l-WS6xJPVxD-M_HU2-Q

    The weighting coefficient can be counted like this:

    https://lh3.googleusercontent.com/_Ji6uTknZtjkORekc2F5uEbTcEUKjdMo3SYoLf9V9paODK_QcD-IIP6lxm5V_E_11nTqIgkS3JfgFpCvynFu0JgHuTkK6UW1RMRQ6tDqwL3aVktQnvutTkyYoZgGW56lVMKjm3QU https://lh4.googleusercontent.com/Q_Ox7YpJkYhe-pd1yzmacgOk4kDw0yQCkvhX6_zODnji8OivFQuqvc9es6Viep0s8f-PA1opKSXJOOIQgGTNbv7Tqh3DKtkya2qHl4cgSWp5_DZ455t0JG6Haf4Icp9g-WsMFk_4

    where https://lh3.googleusercontent.com/DQeW93e9U0_YlRz2MdEDNnTbB_QQio2ayxMQtC_fAINxbyfrlMHvmHroho3hQLv6zkolwG7yeSo3ugx4tagE36fUaBgtHEbwgVntHmduj9HJE2uVVOoJf9BPkv-sZt016DFxmo30 — is the weighted coefficient of the “t-i” value of the original function.

    The value of the function is usually taken using the quote of the closing price. Moving averages can be reconstructed on the basis of the other points (opening quotes, max, min, averaged values, etc.). This can be done in a separate technical analysis window.

     

    Special cases


    The values of the weighting coefficients https://lh5.googleusercontent.com/9tDbd19OM5zApIxNAt0WSfzisX1JtCZMiyUKkFkaGgKBBV5anVYZzbg0GtxejLTvuF1mbcWenP024GvqPobW8reg6pz1i8YUO0x6Lq-XtfCQ_vB2TCZ_XwK6142dOVcw4PzOoGnI determine the type of the moving average.

    1. Simple moving average (SMA).

    The number 1 is always used as a weight.

    1. The final formula is equal to the simple average of the arithmetic values: https://lh3.googleusercontent.com/Ctp1FNReKm_wHYrO4h78AHHeS_4z2RF7YGKf-KLuVOrpMNm7-kiWP3tBu12nYU3k0lPjVV8A6RANbjehMrjILOcy2u195yn4C2A67Gppw7mvNBaZuhLVY1fGn4fl8KBSS5-e3aoy

    2. Exponential moving average (EMA).

    An exponential function is always used as a weight. Weights decrease exponentially and are never equal zero. It is defined by the following formula: https://lh6.googleusercontent.com/Ydyt1_8W6S9jGrU2W6VGFRxrFr02nGMY0VLIC7zpoL-TwbvOSupQlaDmHIHDYSvOjDr3GECNPlIxgnE6FPD76TMkNZAVhWfRcPcH8LL9EJIk3WeW4Tp1aFwH6MyIxVxFt7wFNK9l

    The coefficient https://lh6.googleusercontent.com/oy7FmwJ4DRIQHxiKJRAikcd3pLAR4v6CHJS3D1G9RLXr9pFNW40X8xHNynuo95sh6-uLoHZvzN3q-4ctO6NTwZ4y4fBcdn__rWxQZ7YuG0KbZU1PdKW6-w6IgUaNw1qqrOafcarj can be chosen arbitrarily in the range from 0 to 1.

    For example, it is expressed by means of the value of the smoothing window:

    https://lh6.googleusercontent.com/u1C2-DgBDwyk16w6numZolkKn-nxnqQ15zMWUnbXTDGque6LRWxhrG3JZRGk1x5I0uQarsBvGSwwj-VTkiOHhGexj797JuaF0vWL4QMJzZqg9AVDv-unMPvCF8siYhZYdJweQFlx

    Thus, the exponential moving average reacts to price changes more smoothly.

     

    Example of Calculations


    Let’s take several values of the function https://lh5.googleusercontent.com/h9lseMkFAgJhcp6C5kaz6tydckL9teQjaIyaeGH_oYIba1rGmf0a-CJ6Xl5hZUktzD2a05AgBQ2kjiFBNLmRxZkUASTLzJ9fPJxJRUUYTfWlnnoZplDK99PmUAeRc-PIGsSFk1zL (for example, the quotes for closing by day candles) and calculate the values of different moving averages. Suppose we have 5 prices (days): 80, 106, 85, 87, 93.

    Let’s calculate the 3 point moving averages and see how they differ.

    SMA

    The first day: SMA (3) = (80 + 106 + 85) / 3 = 90.3

    The second day: SMA (3) = (106 + 85 + 87) / 3 = 92.6

    The third day: SMA (3) = (85 + 87 + 93) / 3 = 88.3

    EMA

    The first day: EMA (3) = EMA (2) + K * [85 – EMA (2)]

    What we need for calculation:

    • EMA (2) = EMA (1) + K * [106-EMA (1)]

    • EMA (1) = EMA (0) + K * [80-EMA (0)] = 80

    EMA (2) = 80 + 2/3 * [106-80] = 97.33

    EMA (3) = EMA (2) + K * [85 – EMA (2)]

    The first day: EMA (3) = 97.33 + 1/2 * [85 – 97.33] = 91.165

    The second day: EMA (3) = 91,165 + 1/2 * [87 – 91,165] = 89,083

    The third day: EMA (3) = 89,083 + 1/2 * [93 – 89,083] = 91,042 https://lh6.googleusercontent.com/jsVcffZ6wSLhq8cTZgacLI8EJQ4XnvRtPmO8wU2uNdoiVqXg0QkzdbjEua6pJaTQSDpkdQZkFZsrRP0XuXjXBinv5MZwxumKf6rPhOlagXTaTEUT82APo0RFMKSKwcZTOwIEXC2m

    The graph shows that the EMA (the red dotted line) smoothes the strong deviations in the price, and the SMA (the black line) is guided by them.

     

    Other MA types


    There is quite a large number of different types of moving averages:

    • Weighted moving average (WMA).

    • The volumetric moving average (VMA).

    • Kaufman Adaptive Moving Average (KAMA).

    • Adaptive moving average of Tushara Chanda (VIDYA).

    • Double exponential moving average (DEMA).

    • Triple Exponential Moving Average (TEMA).

    • Modified Brown Moving Average (MMA).

    • Jurik Moving Average (JMA).

    • Smoothed moving average (SMMA).

    • Simple moving median (SMM).

    • Cumulative moving average (CMA).

    Moving averages are one of the simplest, most effective and important indicators for market analysis. Many other indicators are based on them:

    • the Bollinger Bands are based on SMA with a period of 20.

    • the MACD is based on EMA.

    • the “Alligator” is based on SMMA, etc.

    That is why one should start getting familiar with the work of other technical analysis indicators with moving averages.

    Related posts

    WordPress Theme built by Shufflehound.
    © 2014 - 2019 Olymp Trade. All Rights Reserved.