Indicators: AR extrapolation of price

 

AR extrapolation of price:

This indicator uses an autoregresive model to extrapolate prices.

The indicator plots two curves: the blue curve represents the model outputs during its fitting, the red curve shows predicted future prices.

Author: Vladimir

UseDiff=false:

AR extrapolation of price

UseDiff=true:

AR extrapolation of price

 

possible loss of data due to type conversion


 
bt062:

possible loss of data due to type conversion


This warning appears for the following line

Npast=kPast*Ncoef;

You can ignore this warning, because it tells that a double value on the right will be converted to an integer value on the left, which is exactly what the code intended. If you prefer not see this warning, change the above line to

Npast=(int)(kPast*Ncoef); 

 


Thank You


 

Thank You

 

I have no idea where this algorithm comes from. Not a standards Autoregressive model I know or described in many text book. One must be very careful using this algorithm.

 

Hi! Thank you for this indicator!

I would like to use the algorithm in my vb.net program, but I cannot get it work. Probably the problem is due to the fact that in mql5 (and 4) the series are indexed in 'reverse' mode. Simply reversing the ym array doesn't work nor work similar 'manipulations'. An helping hint would be highly appreciated. Thanks!

N

 
As an help to who could be interested, I found out that changing the type of the variables  i, k, kh, ki in the Burg sub from integer to double solved the issue with the code conversion (probably only some of the i, k, kh or ki need to be set as double, but didn't check this yet). The reason for doing that I leave here as an exercise. :)
 
I'm still stuck - attempting to get it working o 4. Any luck guys? 
 
David Russell:
I'm still stuck - attempting to get it working o 4. Any luck guys? 
That is MT5 code
Reason: