On this page
Overview
In this tutorial I turn our free anchored VWAP indicator into an anchored VWAP scan for ThinkOrSwim. The scan looks for stocks pulling back to a VWAP anchored at the March 2020 lows: last week's low was above the line, and this week's low tagged it or went below it.
I'm looking for that line to act as support for at least a shorter-term bounce. I find this works better on large, liquid stocks that a lot of traders watch, like the S&P 100. If you're building lists of stocks that may be due for a bounce, the whole scan is a few edits to the indicator code plus one new line.
Key Takeaways
- The anchored VWAP scan is a custom ThinkOrSwim study filter built from our anchored VWAP indicator code. Its scan condition is one line:
plot signal = low <= anchoredVWAP and low[1] > anchoredVWAP; - In the video, the scan runs on weekly bars with
anchorDateset to 20200323, March 23, 2020, the first candle up after the March 2020 lows. - The scan uses weekly bars because daily data in the Scan tab only reaches back about a year. When I recorded in 2022, a daily scan couldn't reach a March 2020 anchor.
- On the S&P 100, with a volume filter of 500,000 shares and a price filter of $10, the scan returned 10 stocks in the video. Starbucks was one of them.
- The scan builds a list. I look for the bounce on smaller timeframes, from a daily chart down to a 4-hour or 1-hour chart.
What the Anchored VWAP Scan Looks For
The anchored VWAP scan looks for a stock whose weekly low has come back to a VWAP line anchored at a major low. Starbucks was the picture-perfect example when I recorded. I anchored the line to the first candle up after the March 2020 lows, on a weekly chart, and price was pulling back to the line for the first time.

The idea is that the line acts as a level of support for at least a shorter-term bounce. The scan finds every stock in your list where that pullback is happening this week, so you don't have to flip through charts one by one.
The scan reuses the indicator's math. For how anchored VWAP is calculated and how to choose an anchor, see our anchored VWAP indicator tutorial. For a longer look at the same anchor, see our research article Anchored VWAP: March 2020 vs. June 2022.
Why the Scan Uses Weekly Bars
The anchored VWAP scan runs on a weekly aggregation because of how far back the Scan tab can look. On a daily aggregation, a scan can usually reach back only about a year. I recorded this in 2022, so a daily scan would only go back to 2021, and the low I wanted to anchor to was in March 2020.
Weekly bars reach further back, so the scan can find the March 23, 2020 bar and start the VWAP there. The anchor time doesn't matter on a weekly chart, because the time of day on an individual day doesn't change a weekly bar. That's why I left anchorTime as it was.
How to Build the Scan in ThinkOrSwim
The anchored VWAP scan starts from the indicator code, so add the free indicator to ThinkOrSwim first. Then:
- Click the Studies icon, find the anchored VWAP indicator, and click the scroll icon to view its code. Copy all of it and click Cancel.
- Open the Scan tab and clear any filters from your last scan.
- Add two stock filters. I used volume of at least 500,000 and a price of at least $10. On a list like the S&P 100, these may take care of themselves.
- Set the scan to run on the S&P 100, or on the list you prefer.
- Click Add filter, choose Study, open the dropdown that shows ADXCrossover, and pick Custom.
- Click the thinkScript Editor tab and paste in the indicator code.
- Make the changes in the next section, click OK, and run the scan.

When I recorded the video, custom study filters in the Scan tab worked only in a live money account. In paper trading, you can't follow along until you switch to live money.
The Changes From the Indicator Code
The anchored VWAP scan is the indicator code with 3 edits and 1 new line, run on a weekly aggregation. The table shows each change, plus the anchor time, which stays as pasted.
| Item | Indicator | Scan |
|---|---|---|
| Aggregation | Your chart's timeframe | Wk, set at the top of the filter window |
anchorDate | 20210122 in today's download | 20200323 |
anchorTime | 730 in today's download | Left as pasted (930 in the video) |
| Style lines | 3 lines set the cyan color, weight and style | Deleted |
anchoredVWAP | plot | def |
| Scan condition | None | plot signal |

The style lines only matter on a chart, so they come out. Changing anchoredVWAP from plot to def keeps the value available without plotting it, and the new plot signal line is the condition the scan checks.
The Scan Code, Line by Line
The anchored VWAP scan code keeps the indicator's input names, anchorDate and anchorTime, so you can compare it line for line with the indicator.
The Inputs
This step’s code is free with an account. Create one or sign in.
The date is YYYYMMDD. March 23, 2020 was a good date because price in most stocks had made its low and started climbing. The right date may differ for the stock you're looking at, but the scan asks one question across the whole list, so I kept one date.
The Anchor Tests and the VWAP
This step’s code is free with an account. Create one or sign in.
These lines are unchanged from the indicator, except that anchoredVWAP is now a def.
The two tests switch on at the anchor bar, and the two sums only count bars from the anchor bar on. Our anchored VWAP indicator page walks through each of these lines.
The Scan Condition
This step’s code is free with an account. Create one or sign in.
Read it as two checks on the weekly bar. The current week's low is less than or equal to the anchored VWAP, so this week's candle tagged the line or went through it. The previous week's low, low[1], is greater than the anchored VWAP, so last week's candle held above the line.
The condition doesn't care where the week closes. To keep only weeks that closed back above the line, replace the plot signal line with this one:
This step’s code is free with an account. Create one or sign in.
That edit is my suggestion and isn't in the video.

What the Scan Found in the Video
The anchored VWAP scan returned 10 stocks from the S&P 100 on the day I recorded, in early 2022. Starbucks was on the list, which was a good sign, since I expected it to meet the rule. I then checked 4 more from the results on a weekly chart, each with the VWAP anchored to March 23, 2020.
| Stock | What the chart showed in the video |
|---|---|
| Starbucks (SBUX) | Tagging the line for the first time: a clear pullback to the anchored VWAP |
| Comcast (CMCSA) | Above the line last week, low below it this week, close back above it |
| Walmart (WMT) | A similar pullback, after a less drastic February to March 2020 decline |
| Boeing (BA) | Less of a move off the lows, but bouncing into the same line |
| Mastercard (MA) | Bounced off the line once, came back, and closed well above it |
Comcast
Comcast matched the rule: the previous week was above the line and the current week's low was below it. It also closed above the line, though the scan doesn't require that. One more detail I liked: when I measured Comcast's February to March 2020 decline down from its recent high, that level came in at $45.80. That was the low of the week, and price bounced from there.

On a daily chart, the same tag looked less clean than on the weekly, but it shows what happened inside that last weekly candle.
Walmart and Boeing


Walmart showed the same pattern. Boeing looked less appealing, since it hadn't made as much of a move as Walmart or Starbucks. In the video, I said I'd expect a first clean tag like Starbucks to hold up a little better than Boeing. Mastercard had already bounced off the line once and was tagging it again, with a close well above it.
How I Confirm a Bounce
The anchored VWAP scan finds the pullback, and a smaller timeframe shows whether the bounce is starting. I use the weekly scan to get the list, then step down to a daily chart, and from there to a 4-hour or 1-hour chart.
- Daily chart. On Starbucks, the daily chart showed a lot of extended Keltner channel wedges, with a wedge starting to form on the previous Friday's candle. If a bounce starts from there, I want Edge Signals to confirm it.
- Edge Signals. For Volatility Box members, the Edge Signals indicator can confirm a move away from the line. In the video, it had done that on Mastercard's earlier bounce.
- 1-hour chart. The March 2020 anchored line doesn't show on a 1-hour chart, but you can watch for Edge Signals at a finer level, or for the Market Pulse indicator to turn green.
A tag of the line is a place to start watching, and it doesn't tell you whether the bounce holds. Before you take a trade from the list, decide where your stop goes and size the position so a stop-out costs a small, fixed share of your account.
Changing the Anchor Date or Timeframe
The anchored VWAP scan takes any anchor date you type into anchorDate, in YYYYMMDD format with no slashes. A different major low gives you a different list. Keep the weekly aggregation when the anchor is more than about a year back. For an anchor inside the past year, a daily aggregation can reach it.
Common Problems
Most anchored VWAP scan problems come from the account type, the aggregation, or a mismatch with the chart.
- You can't add the custom filter. When I recorded, custom study filters only worked in live money, not paper trading.
- No results, or results that look wrong. Check that the filter aggregation is Wk. A daily scan usually reaches back only about a year, so it can't find a March 2020 anchor.
- The chart doesn't match the scan. Set the indicator on your chart to the same anchor date, 20200323, and view it on a weekly chart.
- A different list on another day. The scan looks at the current week, so the list changes as weeks pass and stocks move away from the line.
How to Import the Ready-Made Scan
The anchored VWAP scan download is a 1-page PDF with a ThinkOrSwim shared link to the finished scan. To load it, click Setup in the top right corner of ThinkOrSwim, choose Open shared item, paste in the link, and save the scan.
If the code you typed throws an error, import the shared scan and compare the two. If you're new to adding custom code, see our guide on how to import a study into ThinkOrSwim. You'll find more free scans on our scans page.
The scan on real data
Drawn from real daily bars with the code on this page, through Oct 20, 2026. The scan runs on weekly bars and finds a week whose low tagged the VWAP anchored at March 23, 2020, after the week before held above it. Our stock data starts in 2024, so only the 14 ETFs, which go back to 2015, can carry a March 2020 anchor. These results cover them alone; the video ran it on the S&P 100.
The scan this week
For the week of Oct 19, 2026, through the Oct 20 close, the scan returned none of the 14 ETFs.
XLRE, week of Sep 28, 2026

XLRE is the most recent hit among the 14 ETFs: its weekly low touched the line in the week of Sep 28, 2026 after holding above it the week before. It closed that week at $40.81; four weeks have not passed yet.
By the numbers
Weekly bars for SPY, QQQ, IWM, DIA and 10 sector ETFs, March 2020 to Oct 20, 2026. The yardstick is every week in the same funds since the anchor. The video uses the line as a level to watch and looks for the entry on a smaller timeframe.
Full thinkScript code
Create a free account or sign in to copy all 19 lines and download the file.
Download
Download the Anchored VWAP Scan for ThinkOrSwim. The download is a 1-page PDF with one ThinkOrSwim shared link to the finished scan. In ThinkOrSwim, click Setup in the top right corner, choose Open shared item, and paste in the link. You can also copy the scan code from the Code tab on this page into a custom study filter. If you're new to adding custom code, here's how to import a study into your ThinkOrSwim platform.
Questions
What does the anchored VWAP scan look for?
It looks for stocks whose low tagged a VWAP line anchored at the March 2020 lows this week, after last week's low held above the line. In the video, it runs on weekly bars with the anchor date set to March 23, 2020, and the goal is a list of stocks pulling back to that line for a possible shorter-term bounce.
How do I build an anchored VWAP scan in ThinkOrSwim?
Copy the code from our anchored VWAP indicator. In the Scan tab, add a Study filter, choose Custom, and paste the code into the thinkScript Editor. Set the aggregation to Wk, change anchorDate to 20200323, delete the 3 style lines, change plot anchoredVWAP to def, and add the plot signal line. Then click OK and run the scan.
Why does the anchored VWAP scan use weekly bars?
Daily data in the ThinkOrSwim Scan tab usually reaches back only about a year. I recorded the video in 2022, so a daily scan could only go back to 2021, and the anchor was March 2020. Weekly bars reach further back, so the scan can find the anchor bar and start the VWAP there.
What anchor date does the scan use?
The scan uses 20200323, March 23, 2020. That was the first candle up after the March 2020 lows, when price in most stocks had made its low and started climbing. You can type another date into the anchorDate input in YYYYMMDD format to scan from a different low or event.
Do I need the anchored VWAP indicator to use the scan?
You don't need it to run the scan. The Code tab on this page has the full scan code, and the download has a shared link to the finished scan. The scan is the indicator's code with a few edits, so you'll still want the indicator on your charts, set to the same anchor date, to check each result.
Why can't I add the custom study filter to my scan?
When I recorded the video, custom study filters in the ThinkOrSwim Scan tab only worked in a live money account. If you are in paper trading, switch to live money to add the filter and run the scan. The volume and price filters are regular stock filters; the anchored VWAP condition is the custom part.
How do I import the anchored VWAP scan?
The download is a PDF with a ThinkOrSwim shared link. In ThinkOrSwim, click Setup in the top right corner, choose Open shared item, paste in the link, and save the scan. You can then run it from the Scan tab or open its filter to see the code.
How do I confirm a bounce after the scan finds a stock?
Step down to smaller timeframes. I use the weekly scan for the list, then a daily chart, then a 4-hour or 1-hour chart. In the video, I look for confirmation from Edge Signals, a Volatility Box member tool, or for the Market Pulse to turn green on the smaller chart. Decide your stop before you enter.
Get each new indicator by email
One email on Sundays with the week's new tool and its code. A free account also unlocks every .txt download.
No credit card. Unsubscribe anytime.
Fair Value Gap
False Breakout Scanner
Heiken Ashi Trend



Stock Volatility Box
Futures Volatility Box
ORB Setups
Squeeze Setups
Anchored VWAP
MACD Crossover Near Zero Line
Increasing Volume
Rate of Change Scans
Fisher Transformer
Upcoming Earnings Scan