OPEN-SOURCE SCRIPT

Machine Learning Moving Average [LuxAlgo]

The Machine Learning Moving Average (MLMA) is a responsive moving average making use of the weighting function obtained Gaussian Process Regression method. Characteristic such as responsiveness and smoothness can be adjusted by the user from the settings.

The moving average also includes bands, used to highlight possible reversals.

🔶 USAGE

快照

The Machine Learning Moving Average smooths out noisy variations from the price, directly estimating the underlying trend in the price.

A higher "Window" setting will return a longer-term moving average while increasing the "Forecast" setting will affect the responsiveness and smoothness of the moving average, with higher positive values returning a more responsive moving average and negative values returning a smoother but less responsive moving average.

Do note that an excessively high "Forecast" setting will result in overshoots, with the moving average having a poor fit with the price.

快照

The moving average color is determined according to the estimated trend direction based on the bands described below, shifting to blue (default) in an uptrend and fushia (default) in downtrends.

快照

The upper and lower extremities represent the range within which price movements likely fluctuate.

快照

Signals are generated when the price crosses above or below the band extremities, with turning points being highlighted by colored circles on the chart.

🔶 SETTINGS

  • Window: Calculation period of the moving average. Higher values yield a smoother average, emphasizing long-term trends and filtering out short-term fluctuations.
  • Forecast: Sets the projection horizon for Gaussian Process Regression. Higher values create a more responsive moving average but will result in more overshoots, potentially worsening the fit with the price. Negative values will result in a smoother moving average.
  • Sigma: Controls the standard deviation of the Gaussian kernel, influencing weight distribution. Higher Sigma values return a longer-term moving average.
  • Multiplicative Factor: Adjusts the upper and lower extremity bounds, with higher values widening the bands and lowering the amount of returned turning points.


🔶 RELATED SCRIPTS

AIartificialintelligencebandsEnvelope (ENV)luxalgomachinelearningmlmoving_averageMoving AveragessignalsTrend Analysis

开源脚本

本着真正的TradingView精神,此脚本的作者已将其开源,以便交易者可以理解和验证它。向作者致敬!您可以免费使用它,但在出版物中重复使用此代码受网站规则约束。 您可以收藏它以在图表上使用。

想在图表上使用此脚本?


Get access to our exclusive tools: luxalgo.com

Join our 150k+ community: discord.gg/lux

All content provided by LuxAlgo is for informational & educational purposes only. Past performance does not guarantee future results.
更多:

免责声明