Zero Phase - Moving Average Filter
A zero phase moving average filter is an odd length FIR filter with coefficients

$$h[n]=\begin{cases}\frac{1}{N},&amp;\quad -(N-1)/2\le n\le (N-1)/2\\0,&amp;\quad\text{otherwise}\end{cases}$$

where $N$ is the (odd) filter length. Since $h[n]$ has non-zero values for $n&lt;0$, it is not causal, and consequently, it can only be implemented by adding a delay, i.e. by making it causal.

Note that you can't simply use Matlab's filtfilt function with that filter because even though you would get zero phase (with a delay), the magnitude of the filter's transfer function gets squared, corresponding to a triangular impulse response (i.e., input samples further away from the current sample receive less weight).

This answer explains in more detail what filtfilt does.

See also this related question.