Timely traffic prediction is important in advanced traffic management systems to make possible rapid and effective response by traffic control facilities. From the observations of traffic flow, the time series present repetitive or regular behavior over time that distinguishes time series analysis of traffic flow from classical statistics, which assumes independence over time. By taking advantage of tools in frequency domain analysis, this paper proposes a new criterion function that can detect the onset of congestion. It is found that the changing rate of the cross-correlation between density dynamics and flow rate determines traffic transferring from free flow phase to the congestion phase. A definition of traffic stability is proposed based on the criterion function. The new method suggests that an unreturnable transition will occur only if the changing rate of the cross-correlation exceeds a threshold. Based on real traffic data, detection of congestion is conducted in which the new scheme performs well compared to previous studies.