SpecialPine Script v6

ta.pivot_point_levels()Pivot Point Levels

Returns a float array of pivot point levels, containing 11 elements for support, resistance, and pivot values.

TradingView language reference

Syntax

Syntax
ta.pivot_point_levels(type, anchor, developing) → float[]

Arguments

ParameterTypeDescription
typeseries stringOne of Traditional, Fibonacci, Woodie, Classic, DM, or Camarilla.
anchorseries boolAnchor condition controlling when the pivot session resets.
developingseries boolOptional, default false. False preserves the last anchor calculation; true recalculates using data since the anchor. Woodie cannot use developing=true.

Returns

An array<float> ordered [P, R1, S1, R2, S2, R3, S3, R4, S4, R5, S5]. Unsupported levels for the selected type are na; DM only supplies P, R1 and S1.

Remarks

Use array.get(levels, index) or levels.get(index) for elements. Square brackets on an array variable refer to history, not an element. Combining Woodie with developing=true causes a runtime error.

Code Examples

Pine Script v6 Example
//@version=6
indicator("pivot_point_levels", overlay=true)
levels = ta.pivot_point_levels("Traditional", timeframe.change("D"), false)
pivot = array.get(levels, 0)
r1 = array.get(levels, 1)
plot(pivot, title="P")
plot(r1, title="R1")

Trading Applications

Calculate traditional pivot points automatically

Identify key support and resistance levels

Use for intraday trading level planning

Build pivot-based trading strategies

Related Functions

Frequently Asked Questions

It bundles standard pivot math into a fixed-size array so you can plot or trade against multiple derived levels without re-implementing the formulas.

The supported identifiers are Traditional, Fibonacci, Woodie, Classic, DM and Camarilla. Use the exact capitalization; Woodie does not support developing=true.

There are eleven slots: P, R1, S1, R2, S2, R3, S3, R4, S4, R5, S5. P is index 0 and R1 is index 1. Levels the chosen type does not calculate remain na, rather than becoming zero.

Generate ta.pivot_point_levels() Code with AI

Draft Pine Script using ta.pivot_point_levels() with Pineify's AI Coding Agent, then review the arguments and test the result on your chart. Usage depends on your plan and available credits.