AB seems great, and, I am pleasantly surprised to see the simplicity of working with different timeframes. I guess such extravaganzas are not available in MS. I will be glad to be proved wrong.
I will give you the code here.
{21 day SMA}
a1:=Valuewhen(1, day() <> ref(day(), -1), Ref(C, -1);
a2:=Valuewhen(2, day() <> ref(day(), -1), Ref(C, -1);
...
...
a21:=Valuewhen(2, day() <> ref(day(), -1), Ref(C, -1);
SMA21:=(a1+a2+...+a21)/21;
{formula ends}
All the ...s will have to be entered. I'm not sure if MS accepts so many variables within an indicator. If you get an error, instead of assigning them to a1,a2,... etc., just add them directly in the last line & divide by 21.
BTW, if any better method is available, I appreciate the sharing of the same in this forum.