Pivot points
All indicators

LibraryLevels

Indicator

Pivot points

Support and resistance levels for the current day, week or month, worked out from the high, low and close of the one before.

LevelsOn the price3 inputsPivots

How it is calculated

From the last completed period: P = (high plus low plus close) divided by 3. Classic: R1 = 2P minus low, S1 = 2P minus high, R2 and S2 = P plus or minus the range, R3 = high plus 2(P minus low), S3 = low minus 2(high minus P). Fibonacci: P plus or minus 0.382, 0.618 and 1 times the range. Camarilla (Scott 1989): close plus or minus 1.1 times the range divided by 12, 6, 4 and 2 for levels 1 to 4; only it has R4 and S4. Days start at 17:00 New York or, as Day starts chooses, at 00:00 UTC; weeks start with Monday's day, months with the 1st.

Reference: Floor trader pivots; Fibonacci pivots; Camarilla (Scott 1989)

How to read it

The levels hold for the whole period and step at its first bar; nothing shows before the first period in the data has ended, and a period the data starts inside counts from its first bar. Price often reacts at P and the first levels. With the default 17:00 New York day a forex Sunday evening is the start of Monday, so Monday's daily levels are Friday's; with 00:00 UTC days they come from those few Sunday hours.

In a strategy

As targets and stops: with ctx.ind("pivots", kind="classic", period="day") a long bought near .p takes .r1 as its target and a stop below .s1. Each level reads by its name: p, r1 to r3, s1 to s3, and r4 and s4 for Camarilla.

Inputs

InputTypeDefaultRange or choices
TypekindChoice"classic"Classic, Fibonacci, Camarilla
PeriodperiodChoice"day"Day, Week, Month
Day startssessionChoice"ny"17:00 New York, 00:00 UTC

What it draws

LineDrawn as
PSteps
R1Steps
R2Steps
R3Steps
S1Steps
S2Steps
S3Steps
R4Steps
S4Steps

Used in

No strategy template reads it yet.

OrionQuant