OPEN-SOURCE SCRIPT
已更新 Projected Moving Averages (Next Candle)

What this indicator does
This indicator plots four fully customizable moving averages (default lengths: 9, 21, 50, 200), but with a twist — instead of showing you where the average has been, it shows you where the average would sit if the current candle's price simply repeated on the next bar.
In other words, each moving average is projected one candle into the future. It simulates the "next" value of the MA by treating the current bar's close as if it also became the next bar's close, then plots that projected value directly under/over where the next candle will form.
This gives you a forward-looking reference line instead of a lagging one — useful for seeing exactly what level the MA needs to cross, or how far the average might shift, before the next candle has even closed.
Features
How to use it
Turn on the offset setting to see each MA line drawn one bar ahead, right where the next candle will print. This makes it easier to visually anticipate MA crosses, support/resistance retests, or trend-following entries before they happen, rather than reacting after the fact.
Important notes
This indicator plots four fully customizable moving averages (default lengths: 9, 21, 50, 200), but with a twist — instead of showing you where the average has been, it shows you where the average would sit if the current candle's price simply repeated on the next bar.
In other words, each moving average is projected one candle into the future. It simulates the "next" value of the MA by treating the current bar's close as if it also became the next bar's close, then plots that projected value directly under/over where the next candle will form.
This gives you a forward-looking reference line instead of a lagging one — useful for seeing exactly what level the MA needs to cross, or how far the average might shift, before the next candle has even closed.
Features
- 4 independent moving averages, each with adjustable length, type (SMA, EMA, WMA, RMA), and color
- Shared, changeable source input (default: close)
- Toggle to shift the plotted lines forward onto the next candle's position, or keep them aligned with the current bar
- Fully overlay-based, works on any timeframe or instrument
How to use it
Turn on the offset setting to see each MA line drawn one bar ahead, right where the next candle will print. This makes it easier to visually anticipate MA crosses, support/resistance retests, or trend-following entries before they happen, rather than reacting after the fact.
Important notes
- This is a smoothing/projection technique, not a predictive or forecasting tool. It does not predict future price — it only shows what the moving average would equal if the most recent price were to repeat. Actual future prices will differ, and the true MA will update once the next candle closes.
- Works with all four supported MA types (SMA, EMA, WMA, RMA); each is projected using logic specific to how that MA type weights new data.
- Best used alongside your existing strategy/trend-following framework, not as a standalone signal generator.
版本注释
What this indicator doesThis indicator plots four fully customizable moving averages (default lengths: 9, 21, 50, 200), but with a twist — instead of showing you where the average has been, it shows you where the average would sit if the current candle's price simply repeated on the next bar.
In other words, each moving average is projected one candle into the future. It simulates the "next" value of the MA by treating the current bar's close as if it also became the next bar's close, then plots that projected value directly under/over where the next candle will form.
This gives you a forward-looking reference line instead of a lagging one — useful for seeing exactly what level the MA needs to cross, or how far the average might shift, before the next candle has even closed.
Features
- 4 independent moving averages, each with adjustable length, type (SMA, EMA, WMA, RMA), and color
- Shared, changeable source input (default: close)
- Toggle to shift the plotted lines forward onto the next candle's position, or keep them aligned with the current bar
- Fully overlay-based, works on any timeframe or instrument
How to use it
Turn on the offset setting to see each MA line drawn one bar ahead, right where the next candle will print. This makes it easier to visually anticipate MA crosses, support/resistance retests, or trend-following entries before they happen, rather than reacting after the fact.
Important notes
- This is a smoothing/projection technique, not a predictive or forecasting tool. It does not predict future price — it only shows what the moving average would equal if the most recent price were to repeat. Actual future prices will differ, and the true MA will update once the next candle closes.
- Works with all four supported MA types (SMA, EMA, WMA, RMA); each is projected using logic specific to how that MA type weights new data.
- Best used alongside your existing strategy/trend-following framework, not as a standalone signal generator.
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。