Difference between RMS and a moving RMS
The total (standard) RMS, continuous time:
$$
x_{RMS}=\sqrt{\frac 1{T_0} \int_0^{T_0} x^2(\tau)d\tau}
$$

And the moving RMS, continuous time:
$$
x_{RMS}(t)=\sqrt{\frac 1{T} \int_{t-T}^t x^2(\tau)d\tau}
$$

Are essentially the same operation, the first one taken over the total number of samples $T_0$ and the second taken over a small number of samples $T$. 

Note also, the moving operation can be taken at any reference $t$, hence it behaves like an operator, like a filter.

In discrete form, it is only required to exhange the integrator by a sum, and the time with the indexes. 
The total (standard) RMS, discrete time:
$$
x_{RMS}=\sqrt{\frac 1{N_0} \sum_{k=1}^{N_0} x^2[k]}
$$

And the moving RMS, discrete time:
$$
x_{RMS}[i]=\sqrt{\frac 1{N} \sum_{k=i-N+1}^i x^2[k]}
$$

Note that both discrete and continuous tends to be the same quantities, provided that $T=Nd\tau$ with $d\tau$ the sampling time.