BTW.. you might want to check out the corona indicators I posted if you are interested in trading cycles. They are based on fourier analysis with FFT also (I assume that is what you are doing with excel based on your screenshots)
The corona indicators could definitely use some improvement in a few areas, but the FFT implementation within is a solid base for working with fourier analysis directly in NT if you are interested in that. =)
That said, Wavelets, specifically the wavelet packet transform is a much better tool for cycle extraction in nonstationary timeseries. You can find an implementation of it in c++ on bearcave.com
The Wavelet Packet Transform (
I will share also some other cycle related tools I have made for NT, one is an implementation of Goertzel DFT I ported from MetaTrader. It is a binned single-frequency DFT algorithm, somewhat better than FFT for extracting primary cycle from non-stationary data.
The other is a toolkit for playing around with wavelets which I synthesized from various sources on the web and the book 'Wavelets for time series analysis' by Percival and Walden. The toolkit only includes standard DWT and MODWT algorithms, not the wavelet packet transform I mentioned above. You would not really want to use the DWT for trading because its results will not be synchronized in time domain with the original data, so only MODWT is useful for trading really.
BE CAREFUL if you are going to use the wavelet toolkit, you will need to read about wavelets and understand what you are doing to make use of it. Changing basis function or other settings can *completely* change the behavior of the transform.
The way its structured you specify whether you want to do decomposition or multiresolution analysis (which consists of a series of decompositions and then their convolution, also referred to as wavelet details and the wavelet smooth, respectively)
Also note that it is 0 indexed, so if you do a level 4 decomposition, index 0-3 will give you the wavelet details. On a level 4 MRA, 0-3 give the details and 4 gives the wavelet smooth.