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
Script de código abierto
Fiel al espíritu de TradingView, el creador de este script lo ha convertido en código abierto, para que los traders puedan revisar y verificar su funcionalidad. ¡Enhorabuena al autor! Aunque puede utilizarlo de forma gratuita, recuerde que la republicación del código está sujeta a nuestras Normas internas.
Exención de responsabilidad
La información y las publicaciones no constituyen, ni deben considerarse como asesoramiento o recomendaciones financieras, de inversión, de trading o de otro tipo proporcionadas o respaldadas por TradingView. Más información en Condiciones de uso.
Script de código abierto
Fiel al espíritu de TradingView, el creador de este script lo ha convertido en código abierto, para que los traders puedan revisar y verificar su funcionalidad. ¡Enhorabuena al autor! Aunque puede utilizarlo de forma gratuita, recuerde que la republicación del código está sujeta a nuestras Normas internas.
Exención de responsabilidad
La información y las publicaciones no constituyen, ni deben considerarse como asesoramiento o recomendaciones financieras, de inversión, de trading o de otro tipo proporcionadas o respaldadas por TradingView. Más información en Condiciones de uso.