• Get $40 off VIP by signing up for a free account! Sign Up

Woodie Pivot Points Scan for ThinkorSwim


Active member
2019 Donor
Was wondering if it would be possible to create a scan only looking for a certain support or resistance level using the Woodie Pivots in TOS. For example, lets say I want to know which stocks are close to their Woodie R3 level (intraday) and if it would be possible to also have alerts when the price is lets say 5 cents from hitting the R3, that would have been great.

Can a scanner like this be made?

Here's the code for the Thinkorswim Woodie Pivots

# TD Ameritrade IP Company, Inc. (c) 2009-2019

input timeFrame = {default DAY, "2 DAYS", "3 DAYS", "4 DAYS", WEEK, MONTH, "OPT EXP", QUARTER, YEAR};
input showOnlyToday = no;

def highByPeriod = high(period = timeFrame)[1];
def lowByPeriod = low(period = timeFrame)[1];
def openByPeriod = open(period = timeFrame);
def closeByPeriod = close(period = timeFrame)[-1];

plot R3;
plot R2;
plot R1;
plot PP;
plot S1;
plot S2;
plot S3;

if showOnlyToday and !IsNaN(closeByPeriod)
then {
    R1 = Double.NaN;
    R2 = Double.NaN;
    R3 = Double.NaN;
    PP = Double.NaN;
    S1 = Double.NaN;
    S2 = Double.NaN;
    S3 = Double.NaN;
} else {
    PP = (highByPeriod + lowByPeriod + 2 * openByPeriod) / 4;
    R1 = 2 * PP - lowByPeriod;
    S1 = 2 * PP - highByPeriod;
    R2 = PP + R1 - S1;
    S2 = PP + S1 - R1;
    R3 = R2 + R1 - PP;
    S3 = S2 + S1 - PP;



def paintingStrategy = if timeframe == timeframe.WEEK then PaintingStrategy.LINE_VS_TRIANGLES else if timeFrame == timeFrame.MONTH or timeFrame == timeFrame."OPT EXP" or timeFrame == timeFrame.QUARTER or timeFrame == timeFrame.YEAR then PaintingStrategy.LINE_VS_SQUARES else PaintingStrategy.LINE_VS_POINTS;

Last edited by a moderator:
@zeek As I read through your request there are a couple of issues to point out. First of all Woodie's Pivots has been defined for aggregations of DAY and above. It does not cover intraday aggregations. Here is the definition from that study

input timeFrame = {default DAY, "2 DAYS", "3 DAYS", "4 DAYS", WEEK, MONTH, "OPT EXP", QUARTER, YEAR};

If you so choose, you can of course program this to include intraday aggregations but in so doing it would not be a true Woodie's Pivot study would it.

The other thing to point out is that if you do decide to use the actual Woodie Pivot study as the basis for your scan query, the scanner does not accept secondary aggregations like an intraday. This is because the base study has the minimal aggregation period of DAY and you're looking to scan for an intraday.

Have a think through this and make any adjustments as needed to your scan requirements for any future follow up
Ok, no problem. But i do have another request that relates to this study and what i am looking for are chart labels for the different Resistance levels that displays the price for R1,R2 & R3. The support levels are not necessary to have as labels.

Can this be added to the Woodie Pivot study?
@zeek Sure thing, just add the following to the end of the TOS Woodie Pivot study

AddLabel(1, "R1 = " + R1, Color.Yellow);
AddLabel(1, "R2 = " + R2, Color.Yellow);
AddLabel(1, "R3 = " + R3, Color.Yellow);
Request for scan using WoodiesPivots where:

Price is in between S2 and S3 on 1H
Low is less than S2 on 4H 1 bar ago

Last edited:

Join useThinkScript to post your question to a community of 21,000+ developers and traders.

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

87k+ Posts
404 Online
Create Post

Similar threads

Similar threads

The Market Trading Game Changer

Join 2,500+ subscribers inside the useThinkScript VIP Membership Club
  • Exclusive indicators
  • Proven strategies & setups
  • Private Discord community
  • ‘Buy The Dip’ signal alerts
  • Exclusive members-only content
  • Add-ons and resources
  • 1 full year of unlimited support

Frequently Asked Questions

What is useThinkScript?

useThinkScript is the #1 community of stock market investors using indicators and other tools to power their trading strategies. Traders of all skill levels use our forums to learn about scripting and indicators, help each other, and discover new ways to gain an edge in the markets.

How do I get started?

We get it. Our forum can be intimidating, if not overwhelming. With thousands of topics, tens of thousands of posts, our community has created an incredibly deep knowledge base for stock traders. No one can ever exhaust every resource provided on our site.

If you are new, or just looking for guidance, here are some helpful links to get you started.

What are the benefits of VIP Membership?
VIP members get exclusive access to these proven and tested premium indicators: Buy the Dip, Advanced Market Moves 2.0, Take Profit, and Volatility Trading Range. In addition, VIP members get access to over 50 VIP-only custom indicators, add-ons, and strategies, private VIP-only forums, private Discord channel to discuss trades and strategies in real-time, customer support, trade alerts, and much more. Learn all about VIP membership here.
How can I access the premium indicators?
To access the premium indicators, which are plug and play ready, sign up for VIP membership here.