Indicator · Pine Script v6 · On the chart

Pivot Points (Woodie)

by mihakralj

This indicator calculates and plots Woodie's pivot points using a weighted closing price formula across daily, weekly, or monthly periods.

View on GitHub

GitHub stars99on the repository
Pine versionv6current
Lines of code49
Settings11inputs
LicenceApache-2.0
Last update4 weeks ago27 Sep 2026

Add It to Your TradingView Chart

  1. 1Copy the scriptPress Copy script above, or the copy button on the code below.
  2. 2Open the Pine EditorOpen a TradingView chart and choose Pine Editor at the bottom of the screen.
  3. 3Paste over the templateCreate a new indicator, select all of the template text and paste. Press Save and give it a name.
  4. 4Add it to the chartPress Add to chart, then adjust the settings with the gear icon next to its name.

Source Code

49 lines of Pine Script v6 from lib/reversals/pivotwood/pivotwood.pine, published under Apache-2.0. Keep the author's credit and licence lines when you reuse it.

pivotwood.pine
// Licensed under the Apache License, Version 2.0
// © mihakralj
//@version=6
indicator("Pivot Points (Woodie)", "PIVOTWOOD", overlay=true)

//@function Calculates Woodie's pivot points with weighted closing price
//@param tf Timeframe for pivot calculation ("D", "W", "M")
//@returns Tuple [pp, r1, r2, r3, s1, s2, s3] with pivot levels
//@references Ken Woodie, weighted close formula
pivotwood(simple string tf) =>
    [hi, lo, cl] = request.security(syminfo.tickerid, tf, [high[1], low[1], close[1]], lookahead=barmerge.lookahead_on)
    if na(hi) or na(lo) or na(cl)
        [na, na, na, na, na, na, na]
    else
        float pp = (hi + lo + 2.0 * cl) / 4.0
        float r1 = 2.0 * pp - lo
        float s1 = 2.0 * pp - hi
        float r2 = pp + (hi - lo)
        float s2 = pp - (hi - lo)
        float r3 = hi + 2.0 * (pp - lo)
        float s3 = lo - 2.0 * (hi - pp)
        [pp, r1, r2, r3, s1, s2, s3]

// ---------- Main loop ----------

// Inputs
i_timeframe = input.timeframe("D", "Pivot Timeframe", options=["D", "W", "M"])
i_show_pp = input.bool(true, "Show Pivot Point")
i_show_r1 = input.bool(true, "Show R1")
i_show_r2 = input.bool(true, "Show R2")
i_show_r3 = input.bool(true, "Show R3")
i_show_s1 = input.bool(true, "Show S1")
i_show_s2 = input.bool(true, "Show S2")
i_show_s3 = input.bool(true, "Show S3")
i_color_pp = input.color(color.yellow, "PP Color")
i_color_r = input.color(color.red, "Resistance Color")
i_color_s = input.color(color.green, "Support Color")

// Calculation
[pp, r1, r2, r3, s1, s2, s3] = pivotwood(i_timeframe)

// Plot
plot(i_show_pp ? pp : na, "PP", color=i_color_pp, linewidth=2, style=plot.style_stepline)
plot(i_show_r1 ? r1 : na, "R1", color=i_color_r, linewidth=1, style=plot.style_stepline)
plot(i_show_r2 ? r2 : na, "R2", color=i_color_r, linewidth=1, style=plot.style_stepline)
plot(i_show_r3 ? r3 : na, "R3", color=i_color_r, linewidth=1, style=plot.style_stepline)
plot(i_show_s1 ? s1 : na, "S1", color=i_color_s, linewidth=1, style=plot.style_stepline)
plot(i_show_s2 ? s2 : na, "S2", color=i_color_s, linewidth=1, style=plot.style_stepline)
plot(i_show_s3 ? s3 : na, "S3", color=i_color_s, linewidth=1, style=plot.style_stepline)

Overview

Pivot Points (Woodie) computes the central pivot point along with three resistance levels (R1, R2, R3) and three support levels (S1, S2, S3), drawing them directly on the price chart as horizontal steplines. Inputs allow traders to select the calculation timeframe, toggle the visibility of individual support and resistance levels, and adjust display colors.

Details

Published by

mihakralj on GitHub

Type

Indicator, Pine Script v6

Draws

On the price chart

Category

Support & resistance

Markets

Any symbol

Timeframes

M1-M5, M15-H1, H4 and above

Risk Notes

No repainting, lookahead or stacked entries were found in its code or README. That says nothing about how well it works: test it first.

Topics

algorithmic-tradingcsharpdotnetpinescriptpythonquantitative-financesimdta-libtechnical-analysistechnical-indicators

Settings

The inputs you can change from the gear icon on the chart. Defaults are the author's.

SettingTypeDefaultVariable
Pivot TimeframetimeframeDi_timeframe
Show Pivot Pointbooltruei_show_pp
Show R1booltruei_show_r1
Show R2booltruei_show_r2
Show R3booltruei_show_r3
Show S1booltruei_show_s1
Show S2booltruei_show_s2
Show S3booltruei_show_s3
PP Colorcolorcolor.yellowi_color_pp
Resistance Colorcolorcolor.redi_color_r
Support Colorcolorcolor.greeni_color_s
Third-party code. ForexR did not write, test or endorse this script, and the summary above was generated automatically from its code and README. Indicators describe the past, and a strategy's backtest can look better than live trading, especially when a script repaints. Check it in the Strategy Tester and on a demo account before you rely on it.

Similar Pine Scripts

948 stars

Moving Average Channel plots separate simple moving averages for upper and lower bands on the price chart. It fills the space between bands with semi-transparent color and colors bars green above the upper band, red below the lower band, or gray in between. Us

Indicator v4 Moving averagesSupport & resistance
Updated 10 days ago · GPL-3.0 GitHub repository of Moving Average Channel

ICT Equal Highs and Lows

by ArunKBhaskar
575 stars

This overlay indicator finds pivot highs and lows on the price chart and compares the last two highs and the last two lows. When the percentage difference between a pair is below the Equal HL threshold, it treats them as equal levels and draws a box. Left and

Indicator v5 SMC / ICT / price actionSupport & resistance
Updated 1 year ago · MPL-2.0 GitHub repository of ICT Equal Highs and Lows
330 stars

This indicator monitors multiple cryptocurrency symbols for trading signals. It calculates and plots entry prices, take profit, and stop loss levels for each symbol including BTCUSDT, ETHUSDT, BNBUSDT and others. Price crossovers trigger buy, sell or close ale

Indicator v5 Support & resistanceScreeners & dashboards
Updated 2 months ago · None stated GitHub repository of Multi Alert Long/Short [Alorse]

This overlay indicator draws a fixed-range volume profile on the price chart, splitting traded activity into up and down volume at each price level. It also plots a sentiment profile, a developing point of control, and value-area high and low around a configur

Indicator v5 VolumeSupport & resistance
Updated 2 months ago · MIT GitHub repository of Volume Profile and Indicator by DGT

BZ-tracker

by Allen1212
303 stars

The BZ-tracker indicator marks ARK Invest buy and sell transactions on stock charts with labels. It plots green labels for purchases and red labels for sales, each annotated with a multiplier such as X1 or X2 to show the number of ARK ETFs trading the stock on

Indicator v4 Support & resistanceScreeners & dashboards
Updated 2 years ago · None stated GitHub repository of BZ-tracker

Function - Linear Regression

by ricardosantos79
261 stars

This indicator fits a linear regression through stored pivot highs and lows and draws the resulting channel on the price chart. A function returns predicted values, maximum and minimum deviations, and the average absolute deviation. Confirmed two-bar pivots up

Indicator v5 TrendSupport & resistance
Updated 4 years ago · None stated GitHub repository of Function - Linear Regression

More indicators

Trade Your Charts With a Regulated Broker

Compare brokers that connect to TradingView, with spreads, minimum deposits and leverage side by side.

Compare brokers