AR Forecast Scatterplot [SS]

ที่อัปเดต:
This is a showcase indicator of my recently released SPTS library (the partner of the SPTS indicator).

This is just to show some of the practical applications of the boring statistical functions contained within the library/SPTS indicator :-).

This is an autoregressive (AR), scatter plot forecaster. What this means is it tags a lag of 1, performs an autoregressive assessment over the desired training time, then uses what it learns over that training time to forecast the likely outcome.

Its not a machine learning (I am in the process of creating one like this, but it is taking quite some time to complete), but the model needs to learn to plan the statistical coefficients that will best mimic the current trend.

As of its current state, this actually surpassed my own expectations. I can show you some QQQ examples:

Example #1:

Prediction:

สแนปชอต

Actual:

สแนปชอต

Example #2:

Prediction:

สแนปชอต

Actual:

สแนปชอต

Pretty nuts, eh?
Statistics, I'm telling you, its the answer haha.


So how do we determine the train time?

Because this is not using machine learning to control for over/under representation of datasize (again, I am making a version that does this, but its a slow process), some quick tips at determine appropriate train time is to use the Tradingview Regression tool:

สแนปชอต

When you set the parameters to align with the current, strongest trend, it is more reliable.
You will see, that it acutally is forecasting a move back to the exact top of this trend, that is because it is using the same processes as the linear regression trend on Tradingview.

You can use a bar counter indicator (such as mine available here) to calculate the number or bars back for your model training.

You can verify that these parameters are appropriate by looking at the Model Data table (which can be toggled on and off). You want to see both a high correlation and a high R2 value.

Quick note on colour:

Green = represents the upper confidence predictions (best case scenario)
Blue = represents the most likely result
red = represents that lower confidence (not as best case scenario)

Hope you enjoy!

Safe trades everyone!
เอกสารเผยแพร่
Added the ability to toggle between line plot and scatter plot (circles). The line plots show the timeframe marked better than the circles, but the circles look more aesthetically pleasing.

You can decide which you prefer!
เอกสารเผยแพร่
Quick bug fix.
เอกสารเผยแพร่
Created 1 new tool and modified some things. Here is what has been added/changed:

Added:
  • The ability to toggle off the variances and only plot the most likely results. This just makes for a cleaner chart with less to account for.

  • The ability for the indicator to plot the predicted trend, by plotting a trendline from the first forecasted result, to the last forecasted result.


Fixed:

There was an error. The statistical model parameters (correlation and R 2) should have been attached to the lag value in the forecast. I have fixed this. All this means is, if you are forecasting 14 bars into the future, the model will look to see how the ACF or autocorrelation function, performs 14 bars back. The further you attempt to forecast in the future, the less reliable the results are owning to an overall decay in autocorrelation after xyz candles.

Enjoy!
เอกสารเผยแพร่
Quick fix
เอกสารเผยแพร่
Updated to include an auto-trend identification. It will auto identify the best lookback length.
This can be manually over-rode in the settings.

Also added the ability to just toggle on the trendline.
เอกสารเผยแพร่
Replaced the trendline with a Polyline.
เอกสารเผยแพร่
Label delete fix,
Special thanks to @peacefulLizard50262!

This will now delete labels/plots on new candles.
forecasting

สคริปต์โอเพนซอร์ซ

ด้วยเจตนารมณ์หลักของ TradingView ผู้เขียนสคริปต์นี้ได้เผยแพร่เป็นโอเพนซอร์ส เพื่อให้เทรดเดอร์สามารถเข้าใจและตรวจสอบได้ ต้องขอบคุณผู้เขียน! ที่ให้คุณใช้ได้ฟรี แต่การนำโค้ดนี้ไปใช้ในการเผยแพร่ซ้ำจะต้องอยู่ภายใต้ กฎระเบียบการใช้งาน คุณสามารถตั้งเป็นรายการโปรดเพื่อใช้บนชาร์ตได้

ต้องการที่จะใช้สคริปต์นี้บนชาร์ตใช่ไหม?


For real-time updates and premium indicators, consider joining my group at: patreon.com/steversteves
และใน:

คำจำกัดสิทธิ์ความรับผิดชอบ