The development of signal processing techniques that allows the estimation of parameters from the power system are crucial to keep the grid within a safe margin of operation. Some methods require a specific sampling rate in order to avoid asynchronous sampling, which may result in errors in estimation algorithms. Due to unbalances between demand and supply, the power signal is time-varying in nature, hindering the selection of an optimal fixed window length. In this work is proposed a technique in which the window length adapts to the actual value of estimated frequency, achieving better performance. The filter utilized to test the method was a moving average filter, but it can be expanded for other algorithms. Results have shown good performance when changing the filter coefficients according to frequency estimation.