OPEN-SOURCE SCRIPT
VWAP Trend Position + Predictive Line

This script (VWAP Trend Position + Predictive Line) plots the VWAP (Volume-Weighted Average Price) and uses recent highs/lows adjusted by ATR (volatility) to figure out the current market trend. If the price breaks above the high threshold, it considers the trend bullish; if it drops below the low threshold, it considers the trend bearish. Candles are colored to reflect this: lavender for uptrends, coral for downtrends, and yellow when there's no clear direction. It also draws a teal line to visualize the active trend level and marks trend reversals with a small triangle below the candle.
On top of that, the script includes a basic predictive line that projects future price based on the current slope of price over a chosen lookback period. It extends that slope into the future by a set number of bars and draws a dashed gray line to show where price might go if the current pace continues. It doesn’t guarantee accuracy — it’s just a straight-line guess based on recent price movement.
This Script is highly inspired by scripts such as, Future Chart Channel by Chartprime; As well as Auto Trendline by DojiEmoji. While I did not copy any script, I would like to show where i got the ideas to make this indicator.
NOTES:
1. you can turn on of off any or all trend lines in the settings
2. you can change the color of the candlesticks to your liking in the settings
3. I would recommend using some sort of stop loss for this indicator, and while it is very accurate, it can be wrong some times
Thank you for reading and using this script!
-saltwater_is_epic
On top of that, the script includes a basic predictive line that projects future price based on the current slope of price over a chosen lookback period. It extends that slope into the future by a set number of bars and draws a dashed gray line to show where price might go if the current pace continues. It doesn’t guarantee accuracy — it’s just a straight-line guess based on recent price movement.
This Script is highly inspired by scripts such as, Future Chart Channel by Chartprime; As well as Auto Trendline by DojiEmoji. While I did not copy any script, I would like to show where i got the ideas to make this indicator.
NOTES:
1. you can turn on of off any or all trend lines in the settings
2. you can change the color of the candlesticks to your liking in the settings
3. I would recommend using some sort of stop loss for this indicator, and while it is very accurate, it can be wrong some times
Thank you for reading and using this script!
-saltwater_is_epic
開源腳本
秉持TradingView一貫精神,這個腳本的創作者將其設為開源,以便交易者檢視並驗證其功能。向作者致敬!您可以免費使用此腳本,但請注意,重新發佈代碼需遵守我們的社群規範。
免責聲明
這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。
開源腳本
秉持TradingView一貫精神,這個腳本的創作者將其設為開源,以便交易者檢視並驗證其功能。向作者致敬!您可以免費使用此腳本,但請注意,重新發佈代碼需遵守我們的社群規範。
免責聲明
這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。