Machine Learning: Gaussian Process Regression [LuxAlgo]

LuxAlgo Wizard تم تحديثه   
We provide an implementation of the Gaussian Process Regression (GPR), a popular machine-learning method capable of estimating underlying trends in prices as well as forecasting them.

While this implementation is adapted to real-time usage, do remember that forecasting trends in the market is challenging, do not use this tool as a standalone for your trading decisions.


The main goal of our implementation of GPR is to forecast trends. The method is applied to a subset of the most recent prices, with the Training Window determining the size of this subset.

Two user settings controlling the trend estimate are available, Smooth and Sigma. Smooth determines the smoothness of our estimate, with higher values returning smoother results suitable for longer-term trend estimates.

Sigma controls the amplitude of the forecast, with values closer to 0 returning results with a higher amplitude. Do note that due to the calculation of the method, lower values of sigma can return errors with higher values of the training window.

🔹Updating Mechanisms

The script includes three methods to update a forecast. By default a forecast will not update for new bars (Lock Forecast).

The forecast can be re-estimated once the price reaches the end of the forecasting window when using the "Update Once Reached" method.

Finally "Continuously Update" will update the whole forecast on any new bar.

🔹Estimating Trends

Gaussian Process Regression can be used to estimate past underlying local trends in the price, allowing for a noise-free interpretation of trends.

This can be useful for performing descriptive analysis, such as highlighting patterns more easily.


  • Training Window: Number of most recent price observations used to fit the model
  • Forecasting Length: Forecasting horizon, determines how many bars in the future are forecasted.
  • Smooth: Controls the degree of smoothness of the model fit.
  • Sigma: Noise variance. Controls the amplitude of the forecast, lower values will make it more sensitive to outliers.
  • Update: Determines when the forecast is updated, by default the forecast is not updated for new bars.
ملاحظات الأخبار:
- Allows for greater training window
- Reduced matrix instability

Get access to our exclusive tools:

Join our 150k+ community:

All content provided by LuxAlgo is for informational & educational purposes only. Past performance does not guarantee future results.
نص برمجي مفتوح المصدر

قام مؤلف هذا النص البرمجي بنشره وجعله مفتوح المصدر، بحيث يمكن للمتداولين فهمه والتحقق منه، وهو الأمر الذي يدخل ضمن قيم TradingView. تحياتنا للمؤلف! يمكنك استخدامه مجانًا، ولكن إعادة استخدام هذا الكود في منشور تحكمه قواعد الموقع. يمكنك جعله مفضلاً لاستخدامه على الرسم البياني.

إخلاء المسؤولية

لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.

هل تريد استخدام هذا النص البرمجي على الرسم البياني؟