This indicator essentially "learns" the relationship between the current value of something and its past values and then tries to predict what the current value will "close" at. It uses a decreasing learning rate so that after awhile it will have "learned" the relationship and not allow large changes to the model. It also can output error bounds so you know approximately what the error may be in its prediction. The time-series is first Z-scored and all predictions are based on this.
The output for this indicator is the "predicted" value for a series when that bar closed or will close.
This is intended for use as "Indicator of Indicator". Feel free to try to use it to predict prices of an instrument but note that AR models are not particularly suited for that type of time series, though the z-scoring method helps a bit here. Please see the picture for more information.
I am working on an ARIMA indicator and this is a step towards that.
User defined inputs
Coeff: No need to use, only for checking the AR coefficients.
Period: The order of the regression, i.e. the number of past values to use in the future prediction.
Predict: Whether or not you want it to predict the "closing" value with error bounds.
PredictColor: The color of the next prediction.
Predict50Color: The color of the 50% approximate confidence interval.
Predict90Color: The color of the 90% approximate confidence interval.
Predict95Color: The color of the 95% approximate confidence interval.
You will want to load a chart with at least a few hundred bars on it when you use this indicator as it can take awhile to converge. The scaling may be a bit off at the beginning of your chart as a result so its more for good visualization rather than any other reason.
Prediction bands only work with live data coming in.
|File Size||4.4 KB|
|# of Downloads||2892|
Importing to NinjaTrader 7 is Easy!
To import your 3rd party app or add-on to NinjaTrader, simply follow these 3 steps:
- Download the app or add-on file to your desktop
- From the NinjaTrader Control Center window, select the menu File > Utilities > Import NinjaScript
- Select the downloaded file from your desktop
Visit the NinjaScript File Sharing discussion in the NinjaTrader user forum to interact with fellow traders and the NinjaTrader support team.