# Estimation moving average without lag

*The principle of the indicator. *

A simple moving average (SMA) with an averaging period (2n + 1) of bars is always obtained lagging by n bars. If SMA or other types of moving averages are the basis for making trading decisions, then their strong delay does not allow to open positions in time and close positions, which leads to losses.

The ** Estimation moving average without lag** (

**) indicator calculates the non-lagging moving average, which is calculated at the points (Inf, n + 1) in the usual way, and at the points of the [n, 0] segment, where 0 is the last bar number, is algorithmically and there is a curvilinear sector (cover out the confidence interval) in which the line of the non-lagging moving average fits with the confidence level specified in the indicator settings. It is clear that the more the confidence probability value is taken (which by default is equal to 0.67), the wider the curvilinear sector of the confidence interval is obtained. If we take the confidence probability equal to zero, then the sector of the indicator readings at points [n, 0] will shrink to a curve, which will pass through the most probable values of the non-lagging average. Statistical studies show that the price around the non-remaining average is distributed according to the Laplace law. Knowledge of the distribution law and the algorithm for calculating the most likely non-lagging average on the [n, 0] segment allow us to calculate the confidence interval sector.**

*EMAWL*

*Trade
using the **Estimation
moving average without lag**indicator.*

If the lower border of the
figure sector of the ** EMAWL** indicator moves to the up, then there
is an uptrend and you need to open positions on

**. If the upper boundary of the curvilinear sector of the**

*Buy***indicator is oriented downwards, then there is a downward trend and you need to open positions on**

*EMAWL***. In such cases, you can be sure of the correctness of the established trend direction with the confidence level set in the indicator settings. If the upper limit of the figure sector of the EMAWL indicator moves to the up, and the lower limit moves down, then there is a flat, which serves as a signal for closing trend positions.**

*Sell*

*Indicator settings.** *

*Price type*- applied price. Values:*Close price, Open price, High price, Low price, Median price*((high + low)/2 - default),*Typical price*((high + low + close)/3),*Weighted price*((high + low + 2*close)/4).*The averaging method*- averaging method. Values:*Simple*(default)*, Exponential, Smoothed, Linear weighted*.*The averaging period*- averaging period. Any integer (21 by default).*Confidence**probability*- Values:*Global shift -*Global shift to start calculating indicator readings. Values:*Paint over the confidence interval?*- Values:*true*(by default),*false*.*Color of the line. –*The color of the indicator line and its figure sector.