Watch how to download trading robots for free
Find us on Telegram!
Join our fan page
Interesting script?
So post a link to it -
let others appraise it
You liked the script? Try it in the MetaTrader 5 terminal
Indicators

AR extrapolation of price - indicator for MetaTrader 5

Published by:
Vladimir
Views:
19094
Rating:
(41)
Published:
2010.07.05 14:14
Updated:
2016.11.22 07:32
MQL5 Freelance Need a robot or indicator based on this code? Order it on Freelance Go to Freelance

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:

AR extrapolation of price

UseDiff=true:

AR extrapolation of price

Linear regression slope Linear regression slope

Linear regression slope normalized to SMA.

A simple RKD Expert Advisor  based on a specified custom RKD indicator A simple RKD Expert Advisor based on a specified custom RKD indicator

This is a simple Expert Advisor, that uses a specified custom RKD indicator.

Fourier extrapolation of price Fourier extrapolation of price

This indicator fits a trigonometric model to prices and extrapolates it in the future.

iS7N_TREND_1 iS7N_TREND_1

Trend indicator with simple smoothing algorithms.