Fast Fourier Transform - Cycle Extraction - page 84

 
MiniMe:
Attached is my updated version of the Extrapolator . I am not best coder but at least my codes and ideas are keeping me profitable so I hope this code will help more traders/coders in their trading system.

The code can be easily modified to be an EA , I was about to do so but I didn't as I have discovered a better approach.

This version of the Extrapolator shows the (open , high , low , close ) I though its a good idea to investigate the correlation and consistency between them .

One note that I haven't seen anyone comment on : Fourier by nature most of the times provide a false entry due to its cycle nature , for example if you attach the Fourier indicator to a low it will give a reversal and high entry and the opposite is true. This is due to the fact that Fourier assumes a mirror image of the signal around the y- axis . So its quite important to add few marks for ur self to keep track with whats happening on the chart , and the attached indicator can help with that.

Anyway I hope its helpful , if you have a bright idea you can convert it into an EA and test it

Regards,

Fadi

Do you know how to make extrapolatorEX faster and less cpu hostile ???

Thanks B4

 
Q_Mouze:
Do you know how to make extrapolatorEX faster and less cpu hostile ??? Thanks B4

Q_Mouze

Not much can be done. Possibly the only way would be to make the whole thing as dll

 

Batchboy "Jerry" ,

It has been a while for this code so i hope I did it right , the concept is to check if future (open, high, low , close ) interactions between each other or check if future highs /lows have any significant value also if this works as it should , it would help to place not only the trade but will help the trader define a tighter stoploss and takeprofit or even scalp within the bar itself, the sky is the limit for the different options.

I modified the code to show the future values as comments , personally I would dump the entire code into an EA for testing instead of calling it from an indicator , but as Mladen mention the math behind it is heavy and will consume the CPU.

Personally I didn't have the time to investigate the different options

Q_Mouze ;

I agree with mladen, what I suggest to reduce the load on the CPU is to call the functions on each new bar instead of on each tick or save the value and call it after x amount of bars

 
MiniMe:
Batchboy "Jerry" ,

It has been a while for this code so i hope I did it right , the concept is to check if future (open, high, low , close ) interactions between each other or check if future highs /lows have any significant value also if this works as it should , it would help to place not only the trade but will help the trader define a tighter stoploss and takeprofit or even scalp within the bar itself, the sky is the limit for the different options.

I modified the code to show the future values as comments , personally I would dump the entire code into an EA for testing instead of calling it from an indicator , but as Mladen mention the math behind it is heavy and will consume the CPU.

Personally I didn't have the time to investigate the different options

Q_Mouze ;

I agree with mladen, what I suggest to reduce the load on the CPU is to call the functions on each new bar instead of on each tick or save the value and call it after x amount of bars

Unfortunately but whenever it comes to a bit more complicated code we are over and over reminded that the P-code logic that metatrader has is not suitable for complex tasks. Making it a dll is a solution, but I doubt that after all the warez like behavior that is almost a rule of thumb on the net already there are people willing to invest some time and knowledge in coding it when in a matter of day or two it will be renamed and sold as something else. In the end, the liberty of the net seems to be taking its casualty : it is obvious that there is less and less people willing to share their knowledge on the net

It was a bit off topic, but I felt that someone had to tell it

 

not real understand . take time to learn.

 
khanman:
not real understand . take time to learn.

I hope you like smoothie

An Interactive Guide To The Fourier Transform | BetterExplained

 

Hello Minime

Thank you for your generous coding. I have been using an earlier version of your extrapolator and see that this new one gives more information. Could you explain a little exactly what we are seeing on the screen there? Thank you.

Stephen

 
someoneinjapan:
Hello Minime

Thank you for your generous coding. I have been using an earlier version of your extrapolator and see that this new one gives more information. Could you explain a little exactly what we are seeing on the screen there? Thank you.

Stephen

Its the same code as the previous one , I only added comments for "Batchboy" because he was asking on how to use it the code into an EA

The current code will always show the value of the 13th future candle due to this line

int FutureBarToBeChecked=13;

remove this line from the start() function and replace it with this line on the top of the code

extern int FutureBarToBeChecked=13;

This way you will be able to select which future candle you want to check

Fourier takes a cyclic nature so it would assume that whatever happened in the past would be repeated in the future , so if you place the Fourier into the chart it would immediately give you a reversal entry which is a mirror image of what happened in the past few bars.

I am not sure this would help you in manual trading , as the signal keeps changing "repaint" with the price progress , but in terms of programming Fourier can be a gold mine

 
UltraBanker:

Extrapolator also uses almost unknown method of so-called amplitude-frequency fit. It is very important DSP method, invented by scientist from Asia.

Humor: the author of Extrapolator did not understand that his Fit-method (built into Extrapolator) is actually a usefull DSP invention (method).

UltraBanker,

Is this the amplitude-frequency fit part?

case 1: //Fit trigomometric series

double w,m,c,s;

for(int harm=0;harm<HarmNo;harm++)

{

Freq(w,m,c,s);

for(i=0;i<np;i++)

{

pv+=m+c*MathCos(w*i)+s*MathSin(w*i);

if(i<=nf) fv+=m+c*MathCos(w*i)-s*MathSin(w*i);

}

}

break;

Reason: