Help with Fourier - page 19

 
Zhunko:
That's what I wrote above. You don't need MA if you use harmonic decomposition.

So, harmonics are also made from Ma, or rather from their difference or division, and here 2+2 and 1+3 pro it was not clear

or do you mean the harmonic obtained from ma4-ma2 and ma3-ma1 are not equal?

 
trol222:
So the harmonics are also built from Ma, or rather from their difference or division, and here 2+2 and 1+3 were not clear.
Sums of harmonics are formed from MA. It is impossible to obtain a single harmonic. You can endlessly squeeze adjacent harmonics, but never squeeze them to zero.
 
trol222:
It might be possible to predict the phase change already.
To be more precise, to switch from predicting prices to determining the start of changes which will inevitably lead to a phase reversal (change) after some time.
 
I recommend reading the article http://novainfo.ru/archive/36/zadacha-dlya-uravneniya-vtorogo-poryadka
 

Friends, I can't understand what's wrong, I'm calculating the FFT in mql5. The signal is not harmonious.

#include <dt_fft.mqh>

int arr = 1024;

double arrayZ[0][14][arr];

   int tnn1=MathPow(2,10);//  размер массива должен быть степенью двойки
   double aa[];
   int N=ArrayResize(aa,tnn1);

   // Построение спектра
   double sig;
   for(int i=0; i<=N-1; i++)
   {

   sig=arrayZ[0][14][i+1]; // рыночные цены
   aa[i]=sig;
    
   }
  
   // Прямое преобразование Фурье - после выпонения функции в массиве aa[] - спектрограмма
   realfastfouriertransform(aa, tnn1, false);
  
   //--- Вывод спектрограммы на экран
   for(int i=0; i<=(N-1)/2; i++)
   {
   // Модуль комплексного числа
      arrayZ[7][4][i+1]=(MathSqrt(aa[i*2]*aa[i*2]+aa[i*2+1]*aa[i*2+1]))/(N/2);
   }
Files:
dt_fft.mqh  58 kb
12.jpg  41 kb
 

p.s. In the near future you will have to learn such concepts as data density, plausibility, "teacher", "noise" as well as harmonics. Noise as well as harmonics.

Reason: