wbburgin

Optimal Moving Average (AI/ML) [wbburgin]

wbburgin 已更新   
Some traders swear by the 200-period moving average. Others, by the 100-period. Others, the 14-period. It depends on your asset, your timeframe, the trend…

The fact of the matter is that no moving average will ever be a consistent indicator for a serious trader - a fixed-length moving average will always need confirmation indicators and tests. When your instrument is trending, you need a faster moving average to better fit the data; when your instrument is ranging, you need a slower moving average that cleans the data. This just is not possible given the way the moving average is traditionally coded, which makes it a lagging indicator.

Thus we need a moving average that:
  1. can project the next prices, and
  2. can change its length depending on what best fits these future prices.

The Optimal Moving Average selects the optimal moving average length for a projected future price. The algorithm classifies moving averages by their effectiveness in predicting future price movement. If a moving average of length n has historically been accurate in predicting the next bar, the moving average will be tested compared to its peers (n-1, n+5, n-100, etc.) and promoted or demoted depending on its effectiveness. This means that the indicator will not have a length input like other static moving averages or machine-learning moving averages on TradingView- it will select the ideal length for your chart from the average that has the least error and best prediction.

Advantages over other ML Moving Averages on TradingView
The vast majority of AI/ML moving average algorithms classify their moving averages only by if the average is above or below the current price.
This approach is inherently flawed because the model
  • Is not predictive of future prices (the structural lagging problem still exists),
  • Is not built on a variable-length MA (cannot select alternating lengths depending on the bar), and
  • does not classify the scale of difference between the MA and the price.

This indicator solves all those problems. It classifies moving averages by the scale of which their rate predicts the next price. Thus it is quick to catch trend changes but also acts as support or resistance, and models the projected price more accurately than a traditional moving average.
版本注释:
Added additional moving averages for maximum error and average error, which can help identify other resistance points in the MA map:


PM me to test any of my non-public strategies free for 7 days.

Invite-only indicators: www.patreon.com/wbburgin/membership
Test my strategies on CryptoRobotics: cryptorobotics.co/?trade=f23b09
仅限邀请脚本

仅限作者授权的用户访问此脚本,并且通常需要付费。您可以将其添加到收藏中,但是只有在向作者请求并获得许可之后,才能使用它。 请与wbburgin联系以获取更多信息,或按照以下作者的说明进行操作。

在您100%信任脚本作者并了解脚本的工作原理之前,TradingView不建议您购买脚本并使用它。在很多情况下,您可以在我们的公共指标库中免费找到一个不错的开源替代品。

免责声明

这些信息和出版物并不意味着也不构成TradingView提供或认可的金融、投资、交易或其它类型的建议或背书。请在使用条款阅读更多信息。

作者的说明

Please visit the first link in my signature to access this script.

想在图表上使用此脚本?

警告:请阅读,然后再请求访问权限。