How to estimate the signal-to-noise ratio of a waveform? I have a signal: $f_i(t_i=i\Delta t)$, where $i = 0\ldots n-1$. 

The signal seems to vary quickly around a slower varying "trend". I am assuming that the quickly varying part is noise and the slowly varying part is the real signal.

How do I estimate the signal-to-noise ratio (SNR) of the signal? 

I guess that if I could decide on a treshold frequency: $\omega_t$ I could use the following expression:

$$S/N=\frac{\displaystyle\int_0^{\omega_t}|F(\omega)|^2}{\displaystyle\int_{\omega_t}^{\infty}|F(\omega)|^2}$$ 
where $F$ denotes the Fourier transform of $f(t)$.
If the spectrum of the signal and the spectrum of the noise do not overlap, you might be able to integrate or sum the energy in each of the two frequency ranges, and take the ratio.