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
Mã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội quy.
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.
Mã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội quy.
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.