Im trying to calculate manually 9 day exponential moving average.how is it different from 9 day simple moving average.i need to know how exactly kite web calculates it.Please provide me the details.i need this to incorporate into my trading program using kite connect this logic.
Simple moving average is the simple average of the last 9 period Price
Exponential moving average different in that when your new value E E_new = New_Data * factor + (1 - factor) * E_current
factor in your case would be 2 / (n + 1) means 2 / ( 9 + 1) = 0.2
Remember that when you are first calculating EMA(9), for the 10th data the last 9 data would be simple moving average as a starting point and then onwards it would continue as I mentioned above
Is it not possible to get the calculated moving average value directly from the api instead of calling another program to calculate it ? Looks like the API charges are so high (if all the technical indicators are not provided by the api and manually we have to calculate). I still have to explore it.
Exponential moving average different in that when your new value E
E_new = New_Data * factor + (1 - factor) * E_current
factor in your case would be 2 / (n + 1) means 2 / ( 9 + 1) = 0.2
Remember that when you are first calculating EMA(9), for the 10th data the last 9 data would be simple moving average as a starting point and then onwards it would continue as I mentioned above
https://github.com/arkochhar/Technical-Indicators