Exponential Moving Average (EMA)
A type of moving average that places a greater weight and significance on the most recent data points. (credit to Investopia)
import { Ticker, TechnicalAnalysisLibrary } from 'traders';
const ticker = new Ticker('V');
const data = await ticker.historical('1d', '2021-02-15', '2021-03-11');
const ta = new TechnicalAnalysisLibrary();
try {
const result = ta.EMA(5, data);
} catch (error) {
console.log(error);
}
# Example of EMA result on
# Visa daily closing price from 2021-02-15 to 2021-03-11
[
209.0766668701172,
212.52777547200526,
212.93518364800352,
212.75345556188518,
214.04563866886096,
214.62042720339429,
214.69695350343474,
213.6313023356232,
214.22420277778525,
216.23946994267715,
217.61298016523529,
219.4653194998053
]
Last updated
Was this helpful?