OPEN-SOURCE SCRIPT

VWAP Trend Position + Predictive Line

348
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

כתב ויתור

המידע והפרסומים אינם מיועדים להיות, ואינם מהווים, ייעוץ או המלצה פיננסית, השקעתית, מסחרית או מכל סוג אחר המסופקת או מאושרת על ידי TradingView. קרא עוד ב־תנאי השימוש.