@admin said in Calculate Simple moving average and exponential moving average:
her option you have is
I have written a python file that is doing this calculation but some how the calculation does not match with the calculations I see on the Angel broking , I need to understand what is wrong with the way I am doing the calculation :
I will elaborate a little , I want to calculate last 5 days moving SMA
say for 19th March 9:15 AM and 19th March 9:30 AM
and I have closing rates for 18th , 17th , 16th , 15th and 12th March , to calculate SMA at 9:15 on 19th march I am adding (18th, 17th,16th and 15th along with closing of 19th 9:15) and dividing it by 5 and for 9:30 AM I am using (15th, 16th ,17th and 18th with closing of 9:30 AM on 19th ) and dividing it by 5.
can you please help were am I going wrong