Controlling a signals amplitude in the frequency domain
You can use Parseval's theorem for DFT. 
$$
\sum_{n=0}^{N-1} |x[n]|^2  = \frac{1}{N} \sum_{к=0}^{N-1} |X[n]|^2
$$
Where $$x[n]$$ - n-th signal sample, 
$$X[n]$$ - n-th value of the DFT of the signal