Logo
OFFLINEPIXEL
/ pinescript-strategies / pine-script-woodie-pivots

$ Pinescript Woodie Pivots

Master this unique pivot point system in TradingView's Pinescript that emphasizes the previous day's closing price, making it particularly reactive for identifying intraday trading opportunities and trends.

500+ Clients Helped
100% Satisfaction
Live Trading Ready
⚠️
Trading financial markets carries risk. All content (PineScript code, indicators, strategies) on this website is for educational purposes only. Past performance is not indicative of future results. By using any code or information from this site, you agree that you are solely responsible for your trading decisions. The author disclaims all liability for any losses incurred. To gain from experts experiences, You can always try our Invite Only Scripts
01

What are Woodie Pivots?

Woodie Pivots are a set of support and resistance levels primarily used by short-term traders, particularly intraday traders. They are distinct from Classic Pivots because their central Pivot Point calculation places a much heavier emphasis on the previous period's closing price. This makes Woodie Pivots highly reactive to recent market sentiment and momentum, as opposed to the broader average used in Classic Pivots.

Developed by Ken Wood, Woodie Pivots derive their levels from the previous day's (or chosen period's) High, Low, and Closing prices. They typically consist of a central Pivot Point (PP), two resistance levels (R1, R2), and two support levels (S1, S2). Some variations also include R3 and S3.

Traders primarily use Woodie Pivots for:

  • Intraday Trend Confirmation: If price opens above PP and holds, it signals a bullish bias.
  • Breakout Trading: A decisive break of R1/S1 or R2/S2 can indicate strong continuation.
  • Reversal Trading: Identifying potential bounces off support or rejections from resistance.
  • Setting Entry/Exit Points: Providing clear reference points for order placement, especially for volatile assets.
02

Components and Calculation (Woodie Pivots)

Woodie Pivots are calculated using the previous period's High, Low, and Close prices, with the most significant difference being in the Pivot Point (PP) formula:


Let `H`, `L`, `C` be the previous period's High, Low, and Close.
  1. Pivot Point (PP): Woodie's PP strongly emphasizes the previous close.
    `PP = (C * 2 + H + L) / 4`
  2. First Resistance (R1):
    `R1 = (2 * PP) - Low`
  3. First Support (S1):
    `S1 = (2 * PP) - High`
  4. Second Resistance (R2):
    `R2 = PP + (High - Low)` `R2 = PP + (R1 - PP)` (Alternative, based on PP and R1 distance)
  5. Second Support (S2):
    `S2 = PP - (High - Low)` `S2 = PP - (PP - S1)` (Alternative, based on PP and S1 distance)
  6. Third Resistance (R3):
    `R3 = R2 + (High - Low)` (Often derived from R2 and Range)
  7. Third Support (S3):
    `S3 = S2 - (High - Low)` (Often derived from S2 and Range)
03

Basic Woodie Pivots Implementation in Pinescript

pine-script@terminal
//@version=5
indicator("My Woodie Pivots", overlay=true, max_bars_back=500) // overlay=true to plot on price chart.

// Input for the Pivot Point calculation timeframe
// Woodie pivots are predominantly used for intraday trading, so "D" (Daily) is most common.
pivotTimeframe = input.string("D", title="Pivot Timeframe", options=["D", "W", "M"])

// Get the Pivot Points values using ta.pivotpoints() with "Woodie" type
// This function returns a tuple: [pp, r1, r2, r3, s1, s2, s3]
[pp, r1, r2, r3, s1, s2, s3] = ta.pivotpoints("Woodie", pivotTimeframe, high, low, close, 1) // `1` indicates to look back 1 period for HLC

// Plotting the Woodie Levels
plot(pp, title="Woodie PP", color=color.purple, linewidth=2, style=plot.style_stepline)
plot(r1, title="Woodie R1", color=color.red, linewidth=1, style=plot.style_stepline)
plot(r2, title="Woodie R2", color=color.red, linewidth=1, style=plot.style_stepline)
plot(r3, title="Woodie R3", color=color.red, linewidth=1, style=plot.style_stepline)
plot(s1, title="Woodie S1", color=color.green, linewidth=1, style=plot.style_stepline)
plot(s2, title="Woodie S2", color=color.green, linewidth=1, style=plot.style_stepline)
plot(s3, title="Woodie S3", color=color.green, linewidth=1, style=plot.style_stepline)

// Optional: Add labels to the pivot lines for clarity (only on the first bar of a new period)
var label pp_label = na
var label r1_label = na
var label r2_label = na
var label r3_label = na
var label s1_label = na
var label s2_label = na
var label s3_label = na

// Check if it's the first bar of the new period (e.g., new day)
isNewPeriod = ta.change(time(pivotTimeframe))

if isNewPeriod
    label.delete(pp_label)
    label.delete(r1_label)
    label.delete(r2_label)
    label.delete(r3_label)
    label.delete(s1_label)
    label.delete(s2_label)
    label.delete(s3_label)

    pp_label := label.new(bar_index, pp, text="PP", style=label.style_label_left, color=color.new(color.purple, 70), textcolor=color.white)
    r1_label := label.new(bar_index, r1, "R1", style=label.style_label_left, color=color.new(color.red, 70), textcolor=color.white)
    r2_label := label.new(bar_index, r2, "R2", style=label.style_label_left, color=color.new(color.red, 70), textcolor=color.white)
    r3_label := label.new(bar_index, r3, "R3", style=label.style_label_left, color=color.new(color.red, 70), textcolor=color.white)
    s1_label := label.new(bar_index, s1, "S1", style=label.style_label_left, color=color.new(color.green, 70), textcolor=color.white)
    s2_label := label.new(bar_index, s2, "S2", style=label.style_label_left, color=color.new(color.green, 70), textcolor=color.white)
    s3_label := label.new(bar_index, s3, "S3", style=label.style_label_left, color=color.new(color.green, 70), textcolor=color.white)

// Extend labels horizontally
label.set_x(pp_label, bar_index)
label.set_x(r1_label, bar_index)
label.set_x(r2_label, bar_index)
label.set_x(r3_label, bar_index)
label.set_x(s1_label, bar_index)
label.set_x(s2_label, bar_index)
label.set_x(s3_label, bar_index)
$ ✓ Compiled successfully
04

Close Price Focus

Close Price Focus

Woodie Pivots' unique strength lies in their strong emphasis on the previous day's closing price in the Pivot Point calculation, making them very responsive to recent market sentiment.

05

Practical Woodie Pivots Trading Strategies

06

1. Pivot Point (PP) as Intraday Trend Bias

pine-script@terminal
//@version=5
strategy("Woodie PP Trend Bias Strategy", overlay=true)

pivotTimeframe = input.string("D", title="Pivot Timeframe", options=["D", "W", "M"])
[pp, r1, r2, r3, s1, s2, s3] = ta.pivotpoints("Woodie", pivotTimeframe, high, low, close, 1)

// Plotting (simplified for strategy example)
plot(pp, title="Woodie PP", color=color.purple, linewidth=2, style=plot.style_stepline)

// Determine intraday bias based on price relative to PP
isBullishBias = close > pp
isBearishBias = close < pp

// Color background to easily visualize bias
bgcolor(isBullishBias ? color.new(color.teal, 95) : na, title="Bullish Intraday Bias")
bgcolor(isBearishBias ? color.new(color.maroon, 95) : na, title="Bearish Intraday Bias")

// Simple entry/exit based on PP crossovers
longCondition = ta.crossover(close, pp)
shortCondition = ta.crossunder(close, pp)

if (longCondition)
    strategy.entry("Long PP Cross", strategy.long)

if (shortCondition)
    strategy.entry("Short PP Cross", strategy.short)

// Basic exit: opposite signal
strategy.close("Long PP Cross", when=shortCondition)
strategy.close("Short PP Cross", when=longCondition)
$ ✓ Compiled successfully
07

2. Range Trading (Between S1 and R1)

pine-script@terminal
//@version=5
strategy("Woodie Range Trading Strategy", overlay=true)

pivotTimeframe = input.string("D", title="Pivot Timeframe", options=["D", "W", "M"])
[pp, r1, r2, r3, s1, s2, s3] = ta.pivotpoints("Woodie", pivotTimeframe, high, low, close, 1)

// Plotting (simplified for strategy example)
plot(r1, title="R1", color=color.red, linewidth=1, style=plot.style_stepline)
plot(s1, title="S1", color=color.green, linewidth=1, style=plot.style_stepline)
plot(pp, title="PP", color=color.purple, linewidth=2, style=plot.style_stepline)

// Check if price is within R1/S1 range (or near it)
isPriceInInnerRange = close < r1 and close > s1

// Long entry: Price bounces from S1 (or near it) and is currently in inner range.
// (Simplified: Price closes above S1 after touching it)
longCondition = close > s1 and close[1] <= s1[1] and isPriceInInnerRange[1]

// Short entry: Price bounces from R1 (or near it) and is currently in inner range.
// (Simplified: Price closes below R1 after touching it)
shortCondition = close < r1 and close[1] >= r1[1] and isPriceInInnerRange[1]

if (longCondition)
    strategy.entry("Long S1 Bounce", strategy.long)

if (shortCondition)
    strategy.entry("Short R1 Rejection", strategy.short)

// Exit: Target PP or opposite pivot level. Stop loss beyond S2/R2.
strategy.exit("Long S1 Bounce Exit", from_entry="Long S1 Bounce", profit=r1, stop=s2)
strategy.exit("Short R1 Rejection Exit", from_entry="Short R1 Rejection", profit=s1, stop=r2)
$ ✓ Compiled successfully
08

3. Breakout Trading (Beyond R2 and S2)

pine-script@terminal
//@version=5
strategy("Woodie Breakout Strategy", overlay=true)

pivotTimeframe = input.string("D", title="Pivot Timeframe", options=["D", "W", "M"])
[pp, r1, r2, r3, s1, s2, s3] = ta.pivotpoints("Woodie", pivotTimeframe, high, low, close, 1)

// Plotting (simplified for strategy example)
plot(r2, title="R2", color=color.red, linewidth=2, style=plot.style_stepline)
plot(s2, title="S2", color=color.green, linewidth=2, style=plot.style_stepline)

// Breakout logic: Price closes decisively above/below R2 or S2
longBreakoutCondition = close > r2 and close[1] <= r2[1]
shortBreakoutCondition = close < s2 and close[1] >= s2[1]

// Optional: Add volume confirmation for breakouts
volumeFactor = input.float(1.5, title="Volume Confirmation Factor", minval=1.0, step=0.1)
avgVolume = ta.sma(volume, 20)
isHighVolume = volume > avgVolume * volumeFactor

if (longBreakoutCondition and isHighVolume)
    strategy.entry("Long R2 Breakout", strategy.long)

if (shortBreakoutCondition and isHighVolume)
    strategy.entry("Short S2 Breakout", strategy.short)

// Exit: Fixed profit/loss or target a fixed number of ATRs
atrLength = input.int(14, title="ATR Length for Exits", minval=1)
atrValue = ta.atr(atrLength)
profitMultiplier = input.float(2.0, title="Profit Target (ATR)", minval=0.5, step=0.1)
stopLossMultiplier = input.float(1.0, title="Stop Loss (ATR)", minval=0.1, step=0.1)

strategy.exit("Long R2 Breakout Exit", from_entry="Long R2 Breakout",
             profit=strategy.position_avg_price + atrValue * profitMultiplier,
             stop=strategy.position_avg_price - atrValue * stopLossMultiplier)

strategy.exit("Short S2 Breakout Exit", from_entry="Short S2 Breakout",
             profit=strategy.position_avg_price - atrValue * profitMultiplier,
             stop=strategy.position_avg_price + atrValue * stopLossMultiplier)
$ ✓ Compiled successfully
09

Optimizing Woodie Pivots Performance

To get the most from Woodie Pivots in Pinescript:

  • Timeframe Selection: Woodie Pivots are most effective for intraday trading. Using them on daily or weekly charts might provide less relevant signals as their responsiveness to the previous close is diluted over longer periods. Ensure your chart timeframe is lower (e.g., 5-min, 15-min, 1-hour) than the pivot calculation timeframe (typically "D").
  • Confirmation is Key: Never rely solely on Woodie Pivots. Always combine them with other indicators (e.g., candlestick patterns, volume, momentum oscillators like RSI, MACD) to confirm reversals or breakouts. High volume on a breakout from a pivot level adds significant credibility.
  • Open and Close Relationship: Pay attention to where the current bar opens and closes relative to the Woodie PP. An open above PP followed by a strong close above it further confirms bullish bias.
  • Volatility Context: Woodie Pivots are highly responsive. They work well in moderately volatile markets that tend to respect intraday levels. In extremely low-volatility markets, they might be too tight. In excessively high-volatility markets, price might blow through all levels quickly.
  • Trade Entry/Exit Zones: Think of Woodie levels as zones where price action is likely to react, rather than exact lines. Look for price to consolidate around these levels or form clear reversal/continuation patterns.
10

Reactive to Recent Price

Reactive to Recent Price

Woodie Pivots' emphasis on the previous close makes them highly reactive to the most recent significant price data, which is ideal for short-term and active traders.

11

Common Woodie Pivots Pitfalls

  • Timeframe Misuse: Using Woodie Pivots on daily or higher timeframes, or trying to trade them on very low liquidity assets, will likely yield suboptimal results.
  • False Signals/Whipsaws: In very choppy markets or during strong news events, price can repeatedly cross Woodie levels, leading to whipsaws and false signals, especially the central PP.
  • Over-Reliance: Using Woodie Pivots as the sole decision-making tool without additional confirmation can lead to significant losses.
  • Gap Risk: Large overnight gaps can cause the current day's trading to occur far away from the calculated Woodie levels, making them less immediately relevant until price approaches them.
  • Limited Beyond R2/S2 (or R3/S3): Once price breaks beyond R2/S2 with strong momentum, it's considered to be in a trending market, and other trend-following tools might be more effective for targets.
12

Conclusion

Conclusion

Woodie Pivots are a dynamic and highly reactive set of support and resistance levels available in Pinescript for TradingView. By uniquely emphasizing the previous day's closing price in their calculation, they provide a sensitive framework for navigating intraday price movements, confirming trend biases, and identifying potential reversal or breakout opportunities. While primarily suited for short-term and active traders, their effectiveness is significantly enhanced when combined with other confirming indicators like candlestick patterns, volume, and momentum oscillators. By understanding their calculation, applying them to appropriate timeframes, and integrating them strategically into your Pinescript strategies, you can leverage Woodie Pivots to improve your entry/exit timing and manage risk in dynamic markets.

Enhance Your Trading

Get a high-performance Pinescript analysis tool for actionable market insights, designed for traders on the move.

This strategy runs in live mode on TradingView, helping you identify potential opportunities.

Get Pinescript Strategy