So great to see gpwr realized the Fourier Extrapolation in MQL4.

If the top rate mark is 100, I will give 200.

You've just helped me to enter the hall of the forecasting EA development.

Thank you very much and wish you have a happy new year.

16316

So great to see gpwr realized the Fourier Extrapolation in MQL4.

If the top rate mark is 100, I will give 200.

You've just helped me to enter the hall of the forecasting EA development.

Thank you very much and wish you have a happy new year.

1134

Great to see that finally some science is applied here instead of "technical analysis"...

2 questions though: how do you define the number of PastBars: obviously changing this number also changes the shape of the curve of the prediction. The question could be answerred with entropy I think but it's not my area of research.

I must say that I expected the linear methods to be close to each other (2-5) but the deviation between the fourier method and modified covariance is quite large sometimes. Have you tried any other methods?

Running it on a backtester with an empty EA testing slowly, you'll be able to see how it performs rather quickly: I plotted it 6 times with all different methods.

6265

Great to see that finally some science is applied here instead of "technical analysis"...

2 questions though: how do you define the number of PastBars: obviously changing this number also changes the shape of the curve of the prediction. The question could be answerred with entropy I think but it's not my area of research.

I must say that I expected the linear methods to be close to each other (2-5) but the deviation between the fourier method and modified covariance is quite large sometimes. Have you tried any other methods?

Running it on a backtester with an empty EA testing slowly, you'll be able to see how it performs rather quickly: I plotted it 6 times with all different methods.

There is no rule to define PastBars. It can be optimized.

I tried almost all methods except for ESPRIT and MUSIC, which require more computing power. I would not expect too much difference between them.

Another way to test these methods, is to build a new indicator, which calculates correlation between predicted pattern for the scanned LastBar and the real one. The indicator output is the correlation for every LastBar and the mean correlation, displayed in Comments(). I checked the Fourier extrapolation using this method for different PastBars and # of harmonics and I regrett to inform that the mean correlation was close to 0, i.e. half of the times, Fourier extrapolation correctly guessed the direction of the price move, and, half of the times, it showed the opposite direction. However, correlation swings between +1 and -1 rather than staying close to 0. And it stays close to +/-1 for some time. This fact may be used to develop a profitable strategy. For example, check if the Fourier extrapolation matched the market direction for some number of previous bars and start trading according to the Fourier predictions. Once these predictions become wrong, stop trading or trade opposite to the Fourier predictions (i.e. if they show prices up, you sell assuming that the prices will actually go down).

16316

Can someone modify the code so it can extrapolate other indicator instead of just price at the moment? The idea is if the timeseries is not as noisy as price maybe the extrapolation would better match future value.

16316

432

**Great piece of Math here. Congratulation and thank you for it. **

Of course I do not htink price will follow RED indicator's line but there is still a lot of other oportunities to use this indicator. I think it should be a case of next research. I believe price does not behave according to a mathematics but rather psychology. And thats why S/R levels are the ones most successfull in technical analysis. I am now working with ZIGZAG and S/R levels and trading in channel, resp. S/R levels breakout trading. I think extrapolation of S/R levels - points (already valid ZIGZAG tops and bottoms) would be more reliable. That's why I am so thankful to you for releasing this great piece. If you do not mind, I would like to use the logic you used to predict price, for my next research in S/R points - ZIGZAG tops and bottoms prediction and trading.

Thank you one more time

16316

6265

**how to read the indicator actually?**

**should we read the last portion ?**

**thanks**

**wily
**

Red color are the values predicted by the selected model without knowing about the true prices at the same bars. If LastBar>0, you have the ability to see how well these predicted prices (red color) match the actual ones up to the zeroth bar. If LastBar=0, the selected model predicts the future. Blue color marks past values, calculated by the selected model to match the actual existing prices at the same bars. All models use different variants of a root-mean-square error minimization algorithm. Blue prices should be very close to the existing prices because they are the result of rms-error minimization. Red prices are not guaranteed to match the actual prices because the models do not have the information about the prices past LastBar (i.e. for Bar<LastBar).

16316

Hi, I really like this indicator, but I need help.

I want to shift this indicator vertically by a set number of points so I can create an extrapolated envelope. I have tried myself but I can only get the red line to move up or down, I can't work out how to get the blue line to move. I only want this function for the Method 1 Fourier Extrapolation.

Can anyone tell me what code I need to add and where i should add it?

Cheers!

80

Very impressing, I think it would be quite accurate for scalping if you would combine it with some RSI.

My need is else, I'm looking for an indicator giving me the main frequency of the last periods. Is there a way to get it from your indicator ?

192517

Extrapolator:

Author: Vladimir