Time series anomaly detection is one of the important tasks in time series analysis, but there are problems such as complex time patterns and difficult representation learning in real world multi-dimensional tasks. A WMAD (Wavelet transform for Multiscale time series Anomaly Detection) method incorporating wavelet decomposition was proposed. Specifically, the multi-temporal pattern extraction capability was enhanced through fusing the temporal patterns of time series uniformly into 2D stacked time windows in a multi-temporal window approach. At the same time, wavelet transform was introduced from the frequency domain perspective to decompose the original sequence into time-varying patterns with different frequency components to capture complex time patterns from the viewpoints of long-term trend changes and short-term transient changes. Based on the feature extraction capability of convolutional networks, a multiscale convolutional network was used to adaptively aggregate time series features at different scales. By adding the attention module containing both spatial and channel attention mechanisms, the extraction of key information was improved based on the enhancement of multiscale feature extraction capability, and thus the accuracy was improved. The anomaly detection results on five public datasets such as SWaT (Secure Water Treatment), SMD (Server Machine Dataset) and MSL (Mars Science Laboratory) show that the F1 values of WMAD method is 3.62 to 9.44 percentage points higher than those of the MSCRED (MultiScale Convolutional Recurrent Encoder-Decoder) method, 3.86 to 11.00 percentage points higher than those of the TranAD (deep Transformer networks for Anomaly Detection) method, and higher than those of other representative methods. The experimental results show that the WMAD method can capture complex temporal patterns in time series and alleviate the problem of difficult representation while having good anomaly detection performance.