Pivot Points
Levels computed from the previous closed period's high, low and close: a pivot P, resistance levels above it and support levels below.
Five families: Classic and Fibonacci draw three on each side, Camarilla and Woodie four, DeMark one; Woodie's pivot also reads the open of the period the levels are drawn across, and DeMark's the open of the previous one. A period's levels stay flat through that period, so each line is a staircase that steps when a new period opens. The period is the day on an intraday chart, the week on a daily chart and the month on a weekly one, unless another is chosen; a monthly chart has no pivots. It measures the previous period's range and centre carried forward, and the forming period sets none of its own levels beyond the open it began with, which Woodie's pivot reads.
01The study, live
Computed by Bentrix’s own code over the same synthetic bars on every page — an illustration of how the study behaves, not a market.
What this figure shows
The figure is computed over 300 sample bars. Pivot Points has no value on the first 24 — the bars it needs before it can answer — and its first value stands on bar 25. Counting the conditions the study declares on these bars: price crosses above S3 never; price crosses below S3 never; price crosses above S2 4 times; price crosses below S2 4 times; price crosses above S1 7 times; price crosses below S1 7 times; price crosses above the pivot 4 times; price crosses below the pivot 4 times. Press a condition under the figure to see each place marked.
02Its parts, named
03What you see
Horizontal levels for the current period — a pivot and supports and resistances around it — computed from the previous period's high, low and close.
04Where it comes from
A floor traders' method from the open-outcry pits, where a quick way to mark the day's likely reference levels was needed before the open. Several families exist; Bentrix offers five: Classic, Fibonacci, Camarilla, Woodie and DeMark.
05The formula
The classic family:
P = (H + L + C)/3, R₁ = 2P − L, S₁ = 2P − H, R₂ = P + (H − L), S₂ = P − (H − L)
using the previous period's high, low and close. The period is the study's own: a day on intraday charts, chosen automatically.
06A worked example
Take a previous day with a high of 27, a low of 23 and a close of 26.
P = (27 + 23 + 26) / 3 = 25.33
The classic levels are reflections of the day's range around it:
- R1 = 2 × 25.33 − 23 = 27.67 and S1 = 2 × 25.33 − 27 = 23.67
- R2 = 25.33 + (27 − 23) = 29.33 and S2 = 25.33 − (27 − 23) = 21.33
The Fibonacci kind keeps the same P and places the levels at 38.2 %, 61.8 % and 100 % of the range from it: R1 = 25.33 + 0.382 × 4 = 26.86. The Camarilla kind measures from the close: R1 = 26 + 4 × 1.1 / 12 = 26.37.
Woodie's kind gives the weight to the new period's open instead of the old close. Suppose today opens at 25: P = (27 + 23 + 2 × 25) / 4 = 25.00, and the levels follow as in the classic kind — R1 = 2 × 25.00 − 23 = 27.00, S1 = 2 × 25.00 − 27 = 23.00.
DeMark's kind chooses a sum by how the previous day closed against its own open. Suppose it opened at 24 and closed at 26, above its open: X = 2 × 27 + 23 + 26 = 103. Then P = 103 / 4 = 25.75, R1 = 103 / 2 − 23 = 28.50 and S1 = 103 / 2 − 27 = 24.50. It has no other level.
07Built in Assay
The same study written in Assay, Bentrix’s script language, and drawn by Bentrix itself as the script’s graph: each block is one step of the formula. On the ladder the steps stand in the script’s order, one a row; on the board each wire carries a value from the block that gives it to the block that reads it, left to right. The script computes exactly what the study computes — Bentrix checks the two against each other, candle by candle.
//@version=6 indicator("Pivot Points", overlay = true) // Which day a bar belongs to. day = math.floor(time / 86400000) newDay = bar_index == 0 or day != day[1] // The day in progress, and the last day that has finished. var float dayHigh = na var float dayLow = na var float dayClose = na var float lastHigh = na var float lastLow = na var float lastClose = na if newDay lastHigh := dayHigh lastLow := dayLow lastClose := dayClose dayHigh := high dayLow := low else dayHigh := math.max(dayHigh, high) dayLow := math.min(dayLow, low) dayClose := close // The classic levels, from the finished day's high, low and close. p = (lastHigh + lastLow + lastClose) / 3 r = lastHigh - lastLow plot(lastLow - 2 * (lastHigh - p), "S3") plot(p - r, "S2") plot(2 * p - lastHigh, "S1") plot(p, "Pivot") plot(2 * p - lastLow, "R1") plot(p + r, "R2") plot(lastHigh + 2 * (p - lastLow), "R3")
Paste it into the Assay IDE to put it on a chart, or to change it. Looking at the graph is free in every package; editing it as blocks is Plus.
08Readings — what traders look for
Traders watch how price behaves at the levels: holding at one is read as the level acting as support or resistance this period; passing through is read as the market having moved beyond the previous period's range.
How a level fails. The levels are arithmetic on one day's three prices. They are watched by many, which is the whole of their force; on a day whose range is several times yesterday's, price passes all of them in the first hour.
Which day? The previous day's high, low and close depend on when the day ends. On a market that trades around the clock two brokers with different server times draw different pivots.
09In different markets and timeframes
Pivot points are intraday levels made from the previous day's high, low and close. They are watched widely on session-based markets; on a market that never closes they depend on where the day is cut.
10With other studies
Read beside the session's VWAP and the previous day's high and low themselves.
11What it does not tell you
The levels are arithmetic on yesterday's three prices. That many people watch them is the main reason they matter at all.
12Inputs and defaults
- 1Kind — classicWhich formula places the levels: Classic (the floor traders'), Fibonacci, Camarilla, Woodie or DeMark. The first three use only the previous period's high, low and close; Woodie's also reads the open of the period the levels are drawn across, and DeMark's the open of the previous one.
- 2Timeframe — ChartThe chart's own by default; any higher one, read on the last closed candle. A finer one is never offered.
- 3Wait for the candle to close — OnThe value of a higher timeframe is taken only from a candle that has finished.
The settings in use
- In useClassic is the most widely watched. Camarilla's levels stand close to the previous close and are used inside the day's range; Woodie's lean on the day's open; DeMark's draws only a pivot and one level each side.
13Limits and common misreadings
The day boundary is a convention on 24-hour markets.
No memory. Each day's levels know nothing of the days before.
14Conditions an alert or a strategy can watch
an event happens on one bar a state holds on every bar while it lasts
These are the conditions the study itself declares — the same rules the alert editor and the strategy engine read, and the ones the figure's chips show.
15Practise it in the laboratory
Put Pivot Points on an intraday chart and, over twenty days, count how often the day's high or low fell within a few points of a level — and how often nowhere near one.
Open the laboratory17In Bentrix
- From the menu: a chart's Indicators button › Trend & channels › Pivot Points, or type Pivot Points in its search.
- Its settings: the settings card opens when it is added; its legend's name opens it again.
18From an agent or a program
Two tools reach it. study_values computes it over a workbench’s candles up to the clock — no chart needed — and study_attach puts it on a chart, where it is drawn and saved with the chart ({"chart": "<chart uri>", "kind": "pivots"}).
The study, as a chart files it
This is a new Pivot Points’s entry — its kind, its calculation, the price it reads and its settings. Change a setting here to read it with other inputs.
{
"applied": "close",
"convention": "custom",
"kind": "pivots",
"settings": {
"kind": "classic",
"shape": "pivots"
}
}An agent
An agent calls the MCP tool with it:
{
"name": "study_values",
"arguments": {
"bench": "bentrix://lab/\u2026/bench/\u2026",
"symbol": "EURUSD",
"timeframe": "H1",
"limit": 5,
"study": {
"applied": "close",
"convention": "custom",
"kind": "pivots",
"settings": {
"kind": "classic",
"shape": "pivots"
}
}
}
}A program
A program does the same in its language — bench and market as in the built-in indicators guide:
Python
values = client.study.values(bench, market, "H1", {"applied": "close", "convention": "custom", "kind": "pivots", "settings": {"kind": "classic", "shape": "pivots"}}, limit=5)
print("times:", values["times"])
for line in values["lines"]:
print("line:", line["line"])
print(" newest values:", line["values"])JavaScript
const values = await client.study.values({ bench, symbol: market, timeframe: "H1", study: { "applied": "close", "convention": "custom", "kind": "pivots", "settings": { "kind": "classic", "shape": "pivots" } }, limit: 5 });
console.log("times:", values.times);
for (const line of values.lines) {
console.log("line:", line.line);
console.log(" newest values:", line.values);
}C#
var values = await client.Study.Values(bench, market, "H1", new Dictionary<string, object?> { ["applied"] = "close", ["convention"] = "custom", ["kind"] = "pivots", ["settings"] = new Dictionary<string, object?> { ["kind"] = "classic", ["shape"] = "pivots" } }, limit: 5);
Console.WriteLine($"times: {values!["times"]!}");
foreach (var line in values!["lines"]!.AsArray())
{
Console.WriteLine($"line: {line!["line"]!}");
Console.WriteLine($" newest values: {line!["values"]!}");
}Go
values := must(client.Study.Values(ctx, mcp.StudyValuesArgs{Bench: bench, Symbol: market, Timeframe: "H1", Study: map[string]any{"applied": "close", "convention": "custom", "kind": "pivots", "settings": map[string]any{"kind": "classic", "shape": "pivots"}}, Limit: mcp.Ptr[int64](5)}))
fmt.Println("times:", at(values, "times"))
for _, line := range at(values, "lines").([]any) {
fmt.Println("line:", at(line, "line"))
fmt.Println(" newest values:", at(line, "values"))
}Java
Object values = client.study.values(new Bentrix.StudyApi.ValuesArgs(bench, market, "H1", obj("applied", "close", "convention", "custom", "kind", "pivots", "settings", obj("kind", "classic", "shape", "pivots"))).limit(5L));
System.out.println("times:" + " " + at(values, "times"));
for (Object line : (List<Object>) at(values, "lines")) {
System.out.println("line:" + " " + at(line, "line"));
System.out.println(" newest values:" + " " + at(line, "values"));
}C++
auto values = client.study.values_(StudyApi::ValuesArgs(bench, market, "H1", Json::Object{{"applied", "close"}, {"convention", "custom"}, {"kind", "pivots"}, {"settings", Json::Object{{"kind", "classic"}, {"shape", "pivots"}}}}).limit(5));
std::cout << "times:" << " " << values["times"].dump() << std::endl;
for (const Json &line : values["lines"].arr()) {
std::cout << "line:" << " " << line["line"].dump() << std::endl;
std::cout << " newest values:" << " " << line["values"].dump() << std::endl;
}Julia
values = client.study.values(bench, market, "H1", Dict{String,Any}("applied" => "close", "convention" => "custom", "kind" => "pivots", "settings" => Dict{String,Any}("kind" => "classic", "shape" => "pivots")); limit = 5)
println("times:", " ", values["times"])
for line in values["lines"]
println("line:", " ", line["line"])
println(" newest values:", " ", line["values"])
endR
values <- client$study$values(bench, market, "H1", list(applied = "close", convention = "custom", kind = "pivots", settings = list(kind = "classic", shape = "pivots")), limit = 5)
cat("times:", format(values$times), "\n")
for (line in values$lines) {
cat("line:", format(line$line), "\n")
cat(" newest values:", format(line$values), "\n")
}Rust
let values = client.study().values(mcp::StudyValuesArgs::new(bench.clone(), market.clone(), "H1", serde_json::json!({"applied": "close", "convention": "custom", "kind": "pivots", "settings": {"kind": "classic", "shape": "pivots"}})).limit(5))?;
println!("times: {}", values["times"]);
for line in values["lines"].as_array().into_iter().flatten() {
println!("line: {}", line["line"]);
println!(" newest values: {}", line["values"]);
}Reading the answer
times— the candles’ open times, in milliseconds since 1970 (UTC), oldest first.lines— one entry per line, in this order, each with itslinename and itsvalues;values[i]belongs to the candle attimes[i].- The last value is the candle at the clock’s, which may still be forming: it changes until that candle closes, as on the chart. Nothing after the clock is ever computed.
nullis a candle with no value yet — the warm-up, about 1 × the period at the start of the history.
line | What it is |
|---|---|
Pivot { level: -3 } | Pivot { level: -3 } |
Pivot { level: -2 } | Pivot { level: -2 } |
Pivot { level: -1 } | Pivot { level: -1 } |
Pivot { level: 0 } | Pivot { level: 0 } |
Pivot { level: 1 } | Pivot { level: 1 } |
Pivot { level: 2 } | Pivot { level: 2 } |
Pivot { level: 3 } | Pivot { level: 3 } |
In a strategy
Filed under a key of your choice in a strategy document’s studies — here pivots: {"pivots": {"applied": "close", "convention": "custom", "kind": "pivots", "settings": {"kind": "classic", "shape": "pivots"}}} — its rules can name:
| Write | What it is |
|---|---|
{"cond": "pivots:pivot.cross_up:S3"} | a condition it declares itself |
{"cond": "pivots:pivot.cross_down:S3"} | a condition it declares itself |
{"cond": "pivots:pivot.cross_up:S2"} | a condition it declares itself |
{"cond": "pivots:pivot.cross_down:S2"} | a condition it declares itself |
{"cond": "pivots:pivot.cross_up:S1"} | a condition it declares itself |
{"cond": "pivots:pivot.cross_down:S1"} | a condition it declares itself |
{"cond": "pivots:pivot.cross_up:P"} | a condition it declares itself |
{"cond": "pivots:pivot.cross_down:P"} | a condition it declares itself |
{"cond": "pivots:pivot.cross_up:R1"} | a condition it declares itself |
{"cond": "pivots:pivot.cross_down:R1"} | a condition it declares itself |
{"cond": "pivots:pivot.cross_up:R2"} | a condition it declares itself |
{"cond": "pivots:pivot.cross_down:R2"} | a condition it declares itself |
{"cond": "pivots:pivot.cross_up:R3"} | a condition it declares itself |
{"cond": "pivots:pivot.cross_down:R3"} | a condition it declares itself |
Its lines named pivot are more than one line of that name, so a strategy reaches them through the conditions above rather than by name.
19Sources
- Kirkpatrick, Charles D. & Dahlquist, Julie R. Technical Analysis: The Complete Resource for Financial Market Technicians, 2nd ed. FT Press, 2010.
Bentrix 0.1.382Every number, name and default on these pages is read from the application itself.What is comingWhat changed