How to select the length of a smoothing moving average filter?
The magnitude frequency response $|Y(\omega)|$ of moving average of length $N$ can be approximated by:

$$|Y(\omega)| \approx |\hat Y(\omega)| = \left|\frac{2\sin(\frac{N\omega}{2})}{N\omega}\right|$$



Figure 1. Horizontal axis: $N\omega$, vertical axis: $|\hat Y(\omega)|$.

The frequency $\omega$ is in radians, meaning that $\omega=2\pi$ corresponds to the sampling frequency. You should choose $N$ such that the noise is attenuated as much as possible while keeping a flat enough frequency response over the signal's bandwidth so that the signal's waveform is not distorted too much. What is flat enough depends on what you are going to do with the signal. A good first bet is to have the -3 dB cutoff frequency at the upper bandlimit of your signal so that no frequency of the signal is attenuated by more than 3 dB. The -3 dB cutoff frequency $\omega_c$ of moving average can be approximated by:

$$\omega_c \approx \hat\omega_c = \frac{2.783}{N}$$

These approximations were derived here.