Dislikedi don't know what you might call the sum of those periods however the calculations in the spreadsheet is right according to my friend and it is open-close.Ignored
SMA is( (open1-close1)+(open2-close2) +(open3-close3) +(open4-close4) +(open5-close5) )/5 - this is your formula variant from the first post.
So the right calculations are in excel file. OK.
I've made indicator and maybe will try to test by EA