Indicators: Fourier extrapolation of price - page 7

 
Past values is ok! The problem is only with future modelled values... Tks
 
Thanks
 
Please how do I get the indicator??
 
pawulo #:
Please how do I get the indicator??

https://www.mql5.com/en/code/download/130/fourier_extrapolator_of_price.mq5 if you go to the top of the indicator posted there is a file with .mq5

 

HI,

I like the incicator. However, when I create a iCustom EA using it, it stops working during the backtest, tester freezes.

For instance, when I do a backtest of EURUSD for the last year, it hangs after 1 month of backtest.

See images too for settings, the graph is where it hangs. Compter is fine, but tester is frozen but can be stopped without issue.

Any ideas?

 
gardee005 #:

Any ideas?

Run it under debugger. Look into the logs.

 

It looks promising except for a tiny detail.

It redraw/repaint/recalculate on new data entirely .

Normally indicators  shouldnt do that (despite applying whathever regression model to preset number of data/bars).

Can somebody please fix it to change indicator value at last bar  only ?

Thanks.

 
Robert72 #:

It looks promising except for a tiny detail.

It redraw/repaint/recalculate on new data entirely .

Normally indicators  shouldnt do that (despite applying whathever regression model to preset number of data/bars).

Can somebody please fix it to change indicator value at last bar  only ?

Your requirement is unclear. Due to specificity of the approach with Fourier transform, the indicator will completely redraw on new data - no matter if it's a bar or a tick.

If you like, you can add the line into OnCalculate:

if(rates_total == prev_calculated) return prev_calculated;
 
Stanislav Korotky #:

Your requirement is unclear. Due to specificity of the approach with Fourier transform, the indicator will completely redraw on new data - no matter if it's a bar or a tick.

If you like, you can add the line into OnCalculate:

Hello Stanislav. 
Firstly, sorry for late and delayed replay. 
You also should excuse for my only superficial knowledge about Fourier transform mathematics and it specificity. 
I am not sure what remained unclear. 
Just for example this indicator:
behave exactly as required i.e. it redraw/flotting on last bar only. The produced curve behind current point remain"fixed". 
This indicator:
 however behave different. It redraw entire curve on new received data while using the same  fitting concept.
Different behavior most than be hidden in a different coding not in a applied model and/or mathematical approach. 
So for titled indicator first behavior (...20480) is not possible because of"specificity of the approach with Fourier transform"? 
And cant be" fixed" with coding it differently?
I will try (posting this from mobile ! ) insert code line you provided but its not likely to catch the issues or solve it. 
Thanks. 


 
Robert72 #:
I am not sure what remained unclear. 
Just for example this indicator:
behave exactly as required i.e. it redraw/flotting on last bar only. The produced curve behind current point remain"fixed". 
This indicator:
 however behave different. It redraw entire curve on new received data while using the same  fitting concept.
Different behavior most than be hidden in a different coding not in a applied model and/or mathematical approach. 
So for titled indicator first behavior (...20480) is not possible because of"specificity of the approach with Fourier transform"? 
And cant be" fixed" with coding it differently?
I will try (posting this from mobile ! ) insert code line you provided but its not likely to catch the issues or solve it. 

Yes, you can run Fourier transform (or nonlinear regression reconstruction) through entire history of the chart and take each last value of result and draw them in a dedicated buffer. You'll get a kind of static MA, which is less informative than dynamic forecasts - they are considered a positive feature of algorithms like Fourier/Wavelets/etc, and you're asking to downgrade them and cut off the forecasts in order to get MA-like curve, if I understand you correctly.