Back

EMA

A couple of simple questions concerning moving averages.

In Lean Docs it states, that EMA is the traditional exponential moving average indicator. What makes it traditional? Being based on Close prices?

And in EMA method:

public ExponentialMovingAverage EMA( Symbol symbol, int period)

is period equivalent to 1 Bar? if I am using 5-min data, is period of 1 equal to one 5-min ?

See my project with EMA-8 and SMA-40 with intraday data. I just want to make sure it is done correctly.

Update Backtest








The EMA is said to be traditional, because it follows the traditional formula:

S[0] = Y[0]
t > 0, S[t] = a Y[t] + (1-a) S[t-1]
where a = 2 / ( period + 1 )

and, therefore, should not be confused with DEMA, TEMA and other exponentially smoothed moving averages.

Yes, the period is the number of bars. There is a convention that lookback periods are defined by bar count and not time span because we do not consider the time markets are closed.

0

The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.


Thanks for your response.

0

Update Backtest





0

The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.


Loading...

This discussion is closed