Predicting the future with Fourier transforms - page 6

 

I don't see any interest in this topic. A couple of people are probably watching and that's it.
Well, that's my own fault. Started the thread with vague assumptions and incomplete indicators.
I've got to fix this. I'll start with the theory.
By future we mean at least a guess of where the price will go.
One cannot predict the future using fast Fourier transforms.
You can do it with normal Fourier transforms if you adjust the window length and the slope.
the length of the window and the slope.
In the end I came to the conclusion that Fourier is not our friend in this business.
I decided to use something like a subwindow with a sine and cosine subwindow
that takes up a given number of periods in that subwindow. So we scan all the subwindows
starting with a minimum length to a given length (subwindows start at a finite
The subwindow starts at the end of time and goes back in time), and uses this data to build a periodogram and a phasogram.
The maxima on the periodogram are used to identify the corresponding periods and plot them on the graph.
them on the graph, extending the fluctuations into the future.

 

Take your time. Finish what you started :)

You yourself wrote earlier that the price reaches the predicted level, but it is unknown when that will be.

What if you try to take a zig-zag (but only Hi-Lo - there already unchanged tops) and try to predict the next top by increment of ZZ tops and when it will appear - by increment of time between tops? And the sostopes in this situation are simpler......

 

A little bit of practice
Here is the new version of the indicator. It differs from the old one
)Human readings
)Fixed many bugs
)Improved many algorithms
)and most importantly highlighting periods can now be done both in automatic and
manual mode.
How to use:
)We attach PF_1_MAIN, and everything is already working in automatic mode.
window length can be adjusted by stretching appeared channel of regression
)We attach PF_2_ANALYSIS, now you can add frequencies manually -
drag and drop scripts to the max -
PF_ADD to add the appropriate frequency
PF_DEL to remove it
Update will occur only on the next tick or if you press refresh.
The respective local high will be searched for and
added or deleted.
)attach PF_3_WIEV - this indicator plots the fluctuations that were found
automatically or manually, individually, in order to visually
assess what kind of maximum we have found.

The input data has only the first indicator, the others get what they need
from the global variables
extern int Lenght=560;// Sets the size of the window
extern int Period_count=2;// Sets the number of periods that we are looking for in the sub-window
extern int InPast=0;// Work on past bars, to evaluate the forecast, as.In the strategy tester this indicator does not work
extern int Futur=100; // For how many bars to make the forecast
extern int iMAperiod=0; // The more - the smoother, it is possible to increase, when there are gaps on the chart
extern int PeriodStep=10; // Two local maxima located closer to each other than PeriodStep - are considered as one

On one currency pair and time interval, you can place only one copy of the indicators (except PF_3_WIEV)


Files:
v3_beta.rar  55 kb
 
vaa20003:

You yourself have written before that the price reaches the predicted level, but there is no telling when that will be.

I didn't write that.

It's ANG3110 who wrote about his indicator

Mine is more general.

 
ANG3110:
m_keeper:

Is there any way to make arrays global?

I'm not quite sure what you need, but when you need to save a lot of data and then read it again, it's easier to use writing to an intermediate file, for example:

int handle=FileOpen("Test.dat",FILE_BIN|FILE_WRITE);

FileWriteArray(handle,arr,0,Narr);

And then read back from another program:

int handle=FileOpen("Test.dat",FILE_BIN|FILE_READ);

FileReadArray(handle,arr,0,Narr);

Please refer to the MT4 Help for more details.

I was looking for something like FileWriteArray

but I already implemented it without it - it's not good to write to disk at each tick

Access rights should be distributed between indicators...

it's easier to re-calculate and now calculations are more economical

 

So far the EURUSD prediction is confirmed.

Only on GBPJPG the terminal is hanging up. 5 minutes waiting.

 

m_keeper

I think you'll find it useful. Have a read. Don't think it's not interesting. On the contrary. Speaking for myself, it (the branch) read carefully. And I think many, too, just treat it with care and do not flood. Keep the branch.

Files:
km.rar  2635 kb
 

I agree with Prival.

A small non-principled remark - when rendering in PF_3_Wiev, the waveforms may extend outside the window. Not very convenient

 
Prival:

m_keeper

... Don't think the branch is not interesting. On the contrary. Speaking for myself, it (the branch) read carefully. And I think many, too, just treat it carefully and do not plop. Keep the branch.

+1

 
goldtrader:
Prival:

m_keeper

... Don't think the branch is not interesting. On the contrary. Speaking for myself, it (the branch) read carefully. And I think many, too, just treat it with care and do not plop. Keep the branch.

+1

+2. I follow it with great interest.

P.S. http://dsp-book.narod.ru/books.html the link was taken on the spider. A lot of literature on DSP.(this is me for the likes of myself, i.e. who is not in the subject but is interested). :))

Reason: