OPEN-SOURCE SCRIPT
VWAP + VWAP Distance Avg + Alert Lines (%)

VWAP Distance & Average Distance Indicator – Detailed Description
The VWAP + VWAP Distance Avg + Alert Lines (%) indicator is designed to measure the distance of the current price from the VWAP (Volume Weighted Average Price), as well as the average distance over a specified period. This tool is particularly useful for traders who use the VWAP as a magnet for price, helping to identify potential trend changes and areas where price may revert toward the VWAP.
Key Features
Current Distance (%)
Calculates the absolute percentage difference between the current price and the VWAP
This line shows how far the price has moved away from the VWAP at any given moment.
Average Distance (%)
Calculates a simple moving average (SMA) of the distance over a specified lookback period.
This provides a reference for typical price deviations from the VWAP, helping traders assess whether the current distance is unusually high or low.
Alert Lines (%)
Allows up to three customizable horizontal alert lines, which can be turned on or off individually.
Each line can be configured with:
Value in percent.
Color.
Line thickness.
These lines serve as visual thresholds, helping traders detect extreme deviations from the VWAP that may precede trend reversals.
Use Case – Detecting Potential Trend Changes
Traders often treat the VWAP as a price magnet, where price tends to revert after significant deviations.
When the current distance exceeds typical average levels or crosses an alert line, it can signal that the price may revert toward the VWAP, potentially indicating a shift in trend or a high-probability mean-reversion scenario.
Disclaimer
This indicator is provided for educational and analytical purposes only. It does not constitute financial advice, and trading decisions are always the sole responsibility of the individual trader. Users should carefully evaluate market conditions and their own risk tolerance before taking any trade.
Better used with VWAP on chart , and be careful around the end of session, for now this works just for session...
still improving on this....
The VWAP + VWAP Distance Avg + Alert Lines (%) indicator is designed to measure the distance of the current price from the VWAP (Volume Weighted Average Price), as well as the average distance over a specified period. This tool is particularly useful for traders who use the VWAP as a magnet for price, helping to identify potential trend changes and areas where price may revert toward the VWAP.
Key Features
Current Distance (%)
Calculates the absolute percentage difference between the current price and the VWAP
This line shows how far the price has moved away from the VWAP at any given moment.
Average Distance (%)
Calculates a simple moving average (SMA) of the distance over a specified lookback period.
This provides a reference for typical price deviations from the VWAP, helping traders assess whether the current distance is unusually high or low.
Alert Lines (%)
Allows up to three customizable horizontal alert lines, which can be turned on or off individually.
Each line can be configured with:
Value in percent.
Color.
Line thickness.
These lines serve as visual thresholds, helping traders detect extreme deviations from the VWAP that may precede trend reversals.
Use Case – Detecting Potential Trend Changes
Traders often treat the VWAP as a price magnet, where price tends to revert after significant deviations.
When the current distance exceeds typical average levels or crosses an alert line, it can signal that the price may revert toward the VWAP, potentially indicating a shift in trend or a high-probability mean-reversion scenario.
Disclaimer
This indicator is provided for educational and analytical purposes only. It does not constitute financial advice, and trading decisions are always the sole responsibility of the individual trader. Users should carefully evaluate market conditions and their own risk tolerance before taking any trade.
Better used with VWAP on chart , and be careful around the end of session, for now this works just for session...
still improving on this....
סקריפט קוד פתוח
ברוח האמיתית של TradingView, יוצר הסקריפט הזה הפך אותו לקוד פתוח, כך שסוחרים יוכלו לעיין בו ולאמת את פעולתו. כל הכבוד למחבר! אמנם ניתן להשתמש בו בחינם, אך זכור כי פרסום חוזר של הקוד כפוף ל־כללי הבית שלנו.
כתב ויתור
המידע והפרסומים אינם מיועדים להיות, ואינם מהווים, ייעוץ או המלצה פיננסית, השקעתית, מסחרית או מכל סוג אחר המסופקת או מאושרת על ידי TradingView. קרא עוד ב־תנאי השימוש.
סקריפט קוד פתוח
ברוח האמיתית של TradingView, יוצר הסקריפט הזה הפך אותו לקוד פתוח, כך שסוחרים יוכלו לעיין בו ולאמת את פעולתו. כל הכבוד למחבר! אמנם ניתן להשתמש בו בחינם, אך זכור כי פרסום חוזר של הקוד כפוף ל־כללי הבית שלנו.
כתב ויתור
המידע והפרסומים אינם מיועדים להיות, ואינם מהווים, ייעוץ או המלצה פיננסית, השקעתית, מסחרית או מכל סוג אחר המסופקת או מאושרת על ידי TradingView. קרא עוד ב־תנאי השימוש.