indicator · on price · open source

DeMark Pivot Points

Deepwick · @deepwickv1Updated 2 Oct 2026▲ 0 users
Running…
Loading chart…

About

DeMark pivots adapt the X-input based on whether the prior bar was bearish, bullish, or a doji — making the resulting PP reflect the directional character of the prior session rather than a neutral average.

  • Bullish prior bar → X weights the high twice; bearish → the low.
  • Plots PP plus the single R1/S1 reaction bands.
  • Good minimalist alternative when the chart is cluttered with too many levels.

Source code

//@version=5
indicator("DeMark Pivot Points", overlay=true)
x = close[1] < open[1] ? ta.highest(high, 1)[1] + 2 * ta.lowest(low, 1)[1] + close[1] : close[1] > open[1] ? 2 * ta.highest(high, 1)[1] + ta.lowest(low, 1)[1] + close[1] : ta.highest(high, 1)[1] + ta.lowest(low, 1)[1] + 2 * close[1]
pp = x / 4
r1 = x / 2 - ta.lowest(low, 1)[1]
s1 = x / 2 - ta.highest(high, 1)[1]
p_PP = plot(pp, "PP", color=color.aqua, linewidth=2)
p_R1 = plot(r1, "R1", color=color.green, style=plot.style_linebr)
p_S1 = plot(s1, "S1", color=color.red, style=plot.style_linebr)

Comments

No comments yet.

Sign in to comment.