You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
I'll try again.
Amplitude and phase are ONE complex number, 1 bar is also 1 number in which the imaginary part = 0. Therefore 8 bars is 8 frequencies. Let's ask klot what he thinks about it.
I did it with complex numbers:
//--- Output the spectrogram to the screen
for( i=0; i<=N-1; i++)
{
// Module of a complex number
SpecktrBuffer[i]=MathSqrt(aa[i*2]*aa[i*2]+aa[i*2+1]*aa[i*2+1]);
}
//---
Amplitude and phase are ONE complex number, 1 bar is also 1 number in which the imaginary part = 0. Therefore 8 bars is 8 frequencies. Let's ask klot what he thinks about it?
I've been dealing with this subject for several years :)
there's even a bunch of pages about TF on my website
http://www.may.nnov.ru/mak/DSP/Contents.shtml
Or google it.
Here's the first link, for example.
http://alglib.sources.ru/fft/realfft.php
end of page:
If we compare this picture with a similar one for the FFT complex function, we notice that frequencies f-1 to f-N/2+1 disappeared somewhere, and only real parts remain from frequencies f0and fN/2, taking the former place of the complex frequency f0. The reason for this is the symmetry properties of the Fourier transform: for the real function h(t) it is true that H(-f) = H *(f).
Thus, the frequencies f-1 to f-N/2+1 no longer carry any new information, as they are obtained by complex conjugation of their symmetric twins, and the frequencies f0and fN/2 have imaginary parts equal to zero.
===========================================================A complex number contains 2 independent components,
A complex number with an imaginary part equal to zero contains 1 independent component.
If the input is a series of complex numbers, we get K frequencies,
If the input is a number of real numbers, then half of the frequencies remain.
Judging by the discussion, this Fourier is something interesting, but unfortunately I don't understand what it's all about,
Can someone explain in a nutshell what it is and how to make an EA out of it?
Judging by the discussion, this Fourier is something interesting, but unfortunately I do not understand what we're talking about here,
can someone explain in a nutshell what it is and how to make an EA out of it?
I can make some inaccuracies.... The point is that any periodic function can be represented as a sum of sinusoidal components of different frequencies, i.e. it can be expanded into Fourier series. Fourier series is a sum of sine and cosine components of doubling frequency (harmonics). By some mathematical manipulations with Fourier transforms data series may be presented as sum ofuniformly varying frequency sinusoids and for each component we obtain amplitude, simply speaking, we obtain frequency response of signal (amplitude of sinusoids with frequency of 1 Hz, 2, 3, etc.). Then by manipulating each frequency component it is possible to filter the signal, etc. etc. That's OK, but one thing, the function has to be periodic, even if it's not periodic, these perobranches imply that it's periodic. Although who knows... maybe there's some benefit to it.
The point is that any periodic function can be represented as ...
Well, if it's not too difficult - a little more for the dummie's level:
Maybe I'm wrong, but it seems to me that small TFs fit rather well to this condition. I observe it now, passing values from M1 with prevBars!=Bars by global variables and reading them at M15 and H1 with 1 min. interval, I see - whether it may strongly affect an entry point inside a bar of the major TF. Maybe for fun, or maybe - "Inside each hourly bar sits 10p of profit :). Or 15p loss :(." If the sine/cosine really does lie - for intraday it will be a real add-on. Seems to me.