I am using the Ta-lib library in my C# project to calculate Exponential moving averages. I have to calculate EMA for 20 periods. I did my calculation on a spreadsheet (Excel) and I got the correct result; while using the same data points with ta-lib library I am getting wrong result.
I am using close price from the attached image.
Core.Ema(startIdx, endIdx, close, 20, out outBegIdx, out outNBElement, smoothClose);
after running ta-lib function my result is
113.783380952381
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
While running the EMA formula on Excel with same period values my result is mentioned in attached image