Skip to content
GetProfitable
Search
Market structure

Classic Floor Trader Pivots

The classic floor pivot with R1, R2, S1 and S2 derived from yesterday's high, low and close, which is the oldest published level set in the business and therefore one a great many people are watching.

indicator
//@version=6
indicator("Classic Floor Trader Pivots", "Pivots", overlay = true)

showSecond = input.bool(true, "Show R2 and S2", group = "Settings")
pivotCol = input.color(#787B86, "Pivot", group = "Style")
resCol = input.color(#EF5350, "Resistance", group = "Style")
supCol = input.color(#26A69A, "Support", group = "Style")

prevHigh = request.security(syminfo.tickerid, "D", high[1], lookahead = barmerge.lookahead_on)
prevLow = request.security(syminfo.tickerid, "D", low[1], lookahead = barmerge.lookahead_on)
prevClose = request.security(syminfo.tickerid, "D", close[1], lookahead = barmerge.lookahead_on)

pivot = (prevHigh + prevLow + prevClose) / 3
dayRange = prevHigh - prevLow
r1 = 2 * pivot - prevLow
s1 = 2 * pivot - prevHigh
r2 = pivot + dayRange
s2 = pivot - dayRange

plot(pivot, "P", color = pivotCol, style = plot.style_linebr, linewidth = 2)
plot(r1, "R1", color = resCol, style = plot.style_linebr)
plot(s1, "S1", color = supCol, style = plot.style_linebr)
plot(showSecond ? r2 : na, "R2", color = color.new(resCol, 40), style = plot.style_linebr)
plot(showSecond ? s2 : na, "S2", color = color.new(supCol, 40), style = plot.style_linebr)

crossedR1 = ta.crossover(close, r1)
crossedS1 = ta.crossunder(close, s1)
plotshape(crossedR1, "Above R1", location = location.belowbar, style = shape.triangleup, color = resCol, size = size.tiny)
plotshape(crossedS1, "Below S1", location = location.abovebar, style = shape.triangledown, color = supCol, size = size.tiny)
alertcondition(crossedR1, "Above R1", "Price crossed above the first resistance pivot")
alertcondition(crossedS1, "Below S1", "Price crossed below the first support pivot")
This runs in TradingView, not here
Pine Script only executes inside TradingView. Paste the source into the Pine Editor and add it to a chart to see it plotted.

What it will not do

  • These are arithmetic from three numbers, not levels anyone defended. They matter only to the extent other participants are also watching them.
  • The previous day is read with lookahead so the levels are fixed from the session open. Change the formula and the whole level set moves with it.
  • On a daily or higher chart the pivot only restates the previous bar and tells you nothing you cannot already see.

Written from this description

Draw the classic floor trader pivot from the previous day's high, low and close, with R1 and S1 either side and an optional R2 and S2, and alert when price crosses R1 or S1.

Educational only, not financial advice. The maths is simple arithmetic on the numbers you enter; it knows nothing about your broker, fees, slippage or the market. Something wrong with it? Say so in Site Feedback.