If you're looking to enhance your trading strategy, you might want to dive into autoregressive (AR) models. These models, also known as linear prediction models, can be a game-changer when it comes to forecasting price movements.
x[n] = -Sum(a[i]*x[n - i], i = 1..p)
Here's a breakdown of the components:
- x[n] is the predicted value of your time series;
- x[n-p] to x[n-1] are the known past values of the series;
- a[1] to a[p] are your model coefficients, and p is the model order.
To fit these model coefficients a[1] to a[p] to your past data, you can use several methods, but this indicator specifically utilizes the Burg method for precision.
When setting up the indicator, you'll need to configure the following inputs:
- UseDiff - a toggle to decide if you want to use price differences instead of the actual prices;
- Ncoef - specifies the number of model coefficients (this is your model order);
- Nfut - the number of future bars you want to predict;
- kPast - the number of past bars you want to include, which should be in increments of Ncoef (must be >= 1).
This indicator will plot two curves for you: the blue curve represents the model outputs during its fitting process, while the red curve indicates the predicted future prices.
When UseDiff is set to false:

When UseDiff is set to true:


Comments 0