Predicting the future with Fourier transforms

 

I can't load the indicator into CodeBase for some reason, so I'll post it here


This is a digital filter based on the Fourier transform and filtering of the resulting spectrum
1) a phase shift by a specified number of bars is performed
2) unimportant harmonics are discarded.
extern double n=9;//set the array size - power of two.
extern intPast=200;// operation on past bars, for estimation of forecasting
extern inttern Futur=100;// For how many bars to make the forecast
extern double Porog=0.03;//The less - the more information will be considered (I recommend from 0 to 0.06 depending on n)
//It works fine for M1-M15

For this indicator to work you need the 'Fast Fourier Transform FFT Library'.

in the figure :
orange - smoothed graph
blue-orange - future forecast


Files:
 

Fourier, if you take the classics, overdraws on history. You need a special application to the financial markets. Looking at this tool, I can say with 99% certainty that it redraws......

 
LeoV:

Fourier, if you take the classics, overdraws on history. You need a special application to the financial markets. Looking at this indicator, I can say with 99% confidence that it redraws......

redraws

 
m_keeper писал (а): redraws

Well, what kind of forecast can we talk about if history is constantly changing?

 
LeoV:
m_keeper wrote: it redraws

Well, what kind of forecast can we talk about if the story is constantly changing?

Why, I think you can. We do not change the history, but our assessment of it changes and so our forecast may change. Although what is implemented here is not ideal, but Ihmo the right direction of research

 

So if I make the historic end not change (apart from the last bar), and the forecast is redrawn on every tick, then it will be OK?

 
Prival:
LeoV:
m_keeper wrote: it redraws

Well, what kind of forecast can we talk about if the story is constantly changing?

Why, I think you can. We do not change the history, but our assessment of it changes and so our forecast may change. Although what is realized here is not ideal, but I think it is the right direction of research.

But then the future will also change because of permanent changes in history (the past) - and the broker will not allow to change orders in the past.......

 
m_keeper:

So, if I make the historical end not change (apart from the last bar), and the forecast is re-drawn at every tick, then it will be OK?

In my personal experience, it's better not to mess with redrawing in autotrading. It's useless - you're wasting your time......

 
What does it have to do with redrawing?! LeoV you just don't understand what it is and what it's about.
 
Integer:
What does it have to do with redrawing?! LeoV you just don't understand what it is and what it's about.

+1

 
m_keeper:

So, if I make the historical end not change (except for the last bar), and the forecast is redrawn on every tick, then it will be OK?

My favourite Fourier has appeared again!


Only it does not show anything with the attached indicator. I do not want to look for errors in other people's codes. (I put the library, of course).

Reason: