OPEN-SOURCE SCRIPT
Anchored VWAP Pro

#Anchored VWAP Pro
by: MasterTonyTA
## What it does
VERY SIMPLE MARK TOPS MARK BOTTOMS- SUPPORT AND RESISTANCE SHOWN
ANCHORED VWAP SHOWS YOU IMPORTANT LEVELS TO KEEP AN EYE TO FLIP, REJECT, OR HOLD
Two anchored VWAPs (top and bottom) with **color memory** — each line stays colored while holding as S/R, turns gray when broken — plus **real-time triangles** marking every wick rejection at the top and bounce at the bottom. Anchors can be set manually via the date/time input in settings, or dragged directly on the chart for fast experimentation.
---
## How it's calculated
**VWAP** (close-based, cumulative from anchor):
```
VWAP = Σ(close × volume) / Σ(volume)
```
Starts at the user-selected anchor bar and accumulates forward.
**Color logic:**
- **Top VWAP** — red while `close < VWAP` (resistance holding), gray when `close > VWAP` (broken)
- **Bottom VWAP** — green while `close > VWAP` (support holding), gray when `close < VWAP` (broken)
**Triangles** (wick-based, fires same bar):
- **🔻 Top Rejection** — `high ≥ Top VWAP` and `close < Top VWAP`
- **🔺 Bottom Bounce** — `low ≤ Bottom VWAP` and `close > Bottom VWAP`
---
## How to trade with it
1. **Anchor the top** to a major swing high — the red line is dynamic resistance from that pivot.
2. **Anchor the bottom** to a major swing low — the green line is dynamic support from that pivot.
3. **Read the state:**
- Red top + green bottom = price inside a dynamic channel, fade the edges
- Top turns gray = resistance broken, look for retest as new support
- Bottom turns gray = support broken, look for retest as new resistance
4. **Trade the triangles:**
- 🔻 = short the rejection, stop above the wick
- 🔺 = long the bounce, stop below the wick
Best anchors are pivots that already matter — major highs, major lows, capitulation candles. Drag the anchor to test different points; the right one is where price clearly respects the line.
---
by: MasterTonyTA
## What it does
VERY SIMPLE MARK TOPS MARK BOTTOMS- SUPPORT AND RESISTANCE SHOWN
ANCHORED VWAP SHOWS YOU IMPORTANT LEVELS TO KEEP AN EYE TO FLIP, REJECT, OR HOLD
Two anchored VWAPs (top and bottom) with **color memory** — each line stays colored while holding as S/R, turns gray when broken — plus **real-time triangles** marking every wick rejection at the top and bounce at the bottom. Anchors can be set manually via the date/time input in settings, or dragged directly on the chart for fast experimentation.
---
## How it's calculated
**VWAP** (close-based, cumulative from anchor):
```
VWAP = Σ(close × volume) / Σ(volume)
```
Starts at the user-selected anchor bar and accumulates forward.
**Color logic:**
- **Top VWAP** — red while `close < VWAP` (resistance holding), gray when `close > VWAP` (broken)
- **Bottom VWAP** — green while `close > VWAP` (support holding), gray when `close < VWAP` (broken)
**Triangles** (wick-based, fires same bar):
- **🔻 Top Rejection** — `high ≥ Top VWAP` and `close < Top VWAP`
- **🔺 Bottom Bounce** — `low ≤ Bottom VWAP` and `close > Bottom VWAP`
---
## How to trade with it
1. **Anchor the top** to a major swing high — the red line is dynamic resistance from that pivot.
2. **Anchor the bottom** to a major swing low — the green line is dynamic support from that pivot.
3. **Read the state:**
- Red top + green bottom = price inside a dynamic channel, fade the edges
- Top turns gray = resistance broken, look for retest as new support
- Bottom turns gray = support broken, look for retest as new resistance
4. **Trade the triangles:**
- 🔻 = short the rejection, stop above the wick
- 🔺 = long the bounce, stop below the wick
Best anchors are pivots that already matter — major highs, major lows, capitulation candles. Drag the anchor to test different points; the right one is where price clearly respects the line.
---
نص برمجي مفتوح المصدر
بروح TradingView الحقيقية، قام مبتكر هذا النص البرمجي بجعله مفتوح المصدر، بحيث يمكن للمتداولين مراجعة وظائفه والتحقق منها. شكرا للمؤلف! بينما يمكنك استخدامه مجانًا، تذكر أن إعادة نشر الكود يخضع لقواعد الموقع الخاصة بنا.
إخلاء المسؤولية
لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.
نص برمجي مفتوح المصدر
بروح TradingView الحقيقية، قام مبتكر هذا النص البرمجي بجعله مفتوح المصدر، بحيث يمكن للمتداولين مراجعة وظائفه والتحقق منها. شكرا للمؤلف! بينما يمكنك استخدامه مجانًا، تذكر أن إعادة نشر الكود يخضع لقواعد الموقع الخاصة بنا.
إخلاء المسؤولية
لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.