ta.pivot_point_levels()Pivot Point Levels
Returns a float array of pivot point levels, containing 11 elements for support, resistance, and pivot values.
Syntax
ta.pivot_point_levels(type, anchor, developing) → float[]Arguments
| Parameter | Type | Description |
|---|---|---|
| type | series string | One of Traditional, Fibonacci, Woodie, Classic, DM, or Camarilla. |
| anchor | series bool | Anchor condition controlling when the pivot session resets. |
| developing | series bool | Optional, 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
//@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
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.
Related Pine Script Functions
ta.pivothigh() - Pivot High
Learn how to use ta.pivothigh() in Pine Script. Detect swing high pivot points for resistance levels.
ta.pivotlow() - Pivot Low
Learn how to use ta.pivotlow() in Pine Script. Detect swing low pivot points for support levels.
ta.highest() - Highest Value
Learn how to use ta.highest() in Pine Script. Find the highest value over a lookback period for Donchian Channels.
ta.lowest() - Lowest Value
Learn how to use ta.lowest() in Pine Script. Find the lowest value over a lookback period.
ta.sar() - Parabolic SAR
Learn how to use ta.sar() in Pine Script. Syntax, parameters, code examples for the Parabolic Stop and Reverse indicator.