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.
---
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.