Expert Advisors • Indicators • Scripts • Libraries

MQL.RobotFX.org is the biggest collection of MetaTrader expert advisors (MT5 & MT4), indicators, scripts and libraries that can be used to improve trading results, minimize risks or simply automate trading tasks

MetaTrader 5 Indicator | AR extrapolation of price

An autoregressive (AR) (or linear prediction) model is given by:

x[n] = -Sum(a[i]*x[n - i], i = 1..p)

where:

  • x[n] is the predicted value of a time series;
  • x[n-p]..x[n-1] are known past values of the same series;
  • a[1]..a[p] are the model coefficients, and p is the model order.

The model coefficients a[1]..a[p] can be fitted to the past data by a variety of methods. This indicator uses the Burg method.

The inputs of the indicator are:

  • UseDiff - a boolean switch to use price differences instead of prices themselves
  • Ncoef - number of model coefficients (model order)
  • Nfut - number of future bars
  • kPast - number of past bars in increments of Ncoef (must be >=1)

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

UseDiff=false:

MetaTrader Experts, Indicators, Scripts and Libraries

UseDiff=true:

MetaTrader Experts, Indicators, Scripts and Libraries

129

Best MetaTrader Indicators + Profitable Expert Advisors