![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
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
...
Fourier Transforms Fast & Fourious...Oldtimers call it repainting....
Here is the screenshot of the first 40 low freq cycles (out of 128). But it is shaping up nicely. The first 20 didn't look promising, but as the frequencies get higher, the amplitudes are getting higher, which should carve this thing out.
Simba was on the right track. Goertzel, looking at the indicator code uses freq^-1. So that tipped me off that I needed to take the output of Goertzel at face value because the calculation to reconstitute a sine wave is:
Amplitude * (Sin (Freq * (Time * (Percentage of Phase * Cycle))))
Cycle = 1/freq
Time = Bar #
Percentage of Phase = Goertzel outputs the phase in Radians, so you have to convert that to degrees first. Then percent of a complete circle.
Carldear could u tell me what is percentage of phase and also give me example for that equation as help for me![](https://c.mql5.com/forextsd/smiles/cry_smile.png)
I'll give it a shot
dear could u tell me what is percentage of phase and also give me example for that equation as help for me
Hello Alysharf,
Since the experts did not respond, I will try to help based on my understanding and with simplest terms possible. Crodzilla defined "percentage of phase as"
.
Two things need to be defined here: Radians and Degrees of circle
A Radian is defined as the ratio of the length of curved arc to its radius. The easiest way to imagine this is to think of a slice of pizza. The length of the curved crust is the arc length, while the length of one of the sides of the slice is the radius. If you take the length of that arc and divide it by the length of the side you get the size of the Radian. By definition, a Radian of 1 means that the ratio between the arc length and the radius is 1 (i.e. arc length = 1 and radius=1).
Now that a Radian is defined, let's talk about Degrees of circle. The easiest way to describe this is to use the pizza slice again, if you were to measure the amount of separation of the two sides of the slice at the apex, that would be the angle of separation and that angle would be annotated in degrees. A complete circle is equal to 360 degrees of separation, in other words if you were to place a pencil in the center of the pizza and then pull two strings (A and B) to the outer edge and keep one stationery while moving the other, as you separate these two lines you are increasing the angle between them from 1 degree, to 2, to 3, ..15,..30,..45,..60,..90,..180 (the two lines are now opposite each other forming a straight line),..240,...270..,300,..360 (now the lines meet each other again as first started).
Now, each slice of pizza has two properties, its Radian and its degree of separation. The nice thing is that by knowing one you can convert to the other. I won't go into details behind how the equation is derived but trust me when I tell you that degrees = Radian x (180/3.14159.. (or Pi)).
So if Geortzel's out put is in Radian (e.g. 1) you can convert that into degrees using the equation above like this
1 Radian = 1 x (180/Pi) = 57.2958 degrees.
Now take that figure and divide it by 360 to obtain the "Percentage of Phase", which would be
Percentage of Phase of 1 Rad = (57.2958/360) x 100 = 15.9%
I hope I made sense. I am sure there are other experts that can provide a much more articulate explanation than me but nevertheless I wanted to give it a try.
Cheers,
Pip
Pip
Nice work Pip lol...
You didn't mention anywhere that radian is the angular distance. Drop it in there somewhere and you get a degree in mathematics.
I want to do some mathematical calculation on an indicator I saw in an earlier post. Is anyone out there able to do some alteration to an indiactor if I give them the mathematical rules?
I want to convert a single phase into a multi phase indicator by analysing amplitudes.
Well Pava you game to try it? lol
Nice work Pip lol...
You didn't mention anywhere that radian is the angular distance. Drop it in there somewhere and you get a degree in mathematics.
I want to do some mathematical calculation on an indicator I saw in an earlier post. Is anyone out there able to do some alteration to an indiactor if I give them the mathematical rules?
I want to convert a single phase into a multi phase indicator by analysing amplitudes.
Well Pava you game to try it? lolTradability,
The nice thing about this forum is that no one person knows everything and its the collaborative attitude the produces winners on this forum. Thank you for contributing your bit to my explanation. With your effort and mine now Alysharf can figure things out much easier.
Cheers mate!
Anyone know whats the indicators name showing the cycles on the first page of this thread?
Can anyone sum the amplitute on the each of the three cycles it shows to give a resultant vector?
This should provide a much better indicator I believe. Call it the Tradability Cycles lol
Anyone know whats the indicators name showing the cycles on the first page of this thread?
Can anyone sum the amplitute on the each of the three cycles it shows to give a resultant vector?
This should provide a much better indicator I believe. Call it the Tradability Cycles lolHello again Tradability,
The indicator is called FFT and it require a library to operate and I think it mentions that somewhere in the post. As for your suggestions, it has already been done and it is available in one of the posts in this thread, try browsing for it, sorry I don't have a direct link.
Cheers,
Mr Pip
Hello again Tradability,
The indicator is called FFT and it require a library to operate and I think it mentions that somewhere in the post. As for your suggestions, it has already been done and it is available in one of the posts in this thread, try browsing for it, sorry I don't have a direct link.
Cheers,I've been through this thread and can't find what I have described in summing the amplitudes of the three respective curves in vector form.
Perhaps you can point me to that IF that is what I am describing, but I can tell you what I am asking for is complex to do and even harder to understand unless your a mathematician.
Keep me posted as to where it's been done and I'll check it out if it has and if so was it done correctly.
Cheers
TB
In FFT indicator you can easily sum vectors.
I've been through this thread and can't find what I have described in summing the amplitudes of the three respective curves in vector form.
Perhaps you can point me to that IF that is what I am describing, but I can tell you what I am asking for is complex to do and even harder to understand unless your a mathematician.
Keep me posted as to where it's been done and I'll check it out if it has and if so was it done correctly.
Cheers
TBWell, the picture on the download link of the FFT indicator shows exactly this. A sum of three vectors (the red line).
Regards,
Michal
Well, the picture on the download link of the FFT indicator shows exactly this. A sum of three vectors (the red line).
Regards,
MichalThanks for clarifying this BUT.. the RED is not the sum of the amplitudes. I have examined this at specific points and can see that the red should be at a different level. So possible confusion is that whomever coded it altered where the resultant vector is. The question is where is the starting base? Thats critical as it will show the overall position relative to all the cycles. I think the RED is the sum of slopes perhaps at specific points but not sure, however it's definately not the sum of amplitudes at all.
Look at the 7th Feb time 11 the RED should be above all the cycles and it's not so if in this point its not then its not at many other points.