Docs

ITMScript

Draw pivot levels from the previous day

Draw a pivot with two support and two resistance levels from the previous day's high, low and close.

Draw a pivot with support and resistance levels from the high, low and close of the last finished day.

itm
//@itmscript 2
study("Daily pivots", overlay=true)
second = input.bool(true, "Second levels")
h = high@1d
l = low@1d
c = close@1d
pivot = (h + l + c) / 3
plot(pivot, "Pivot", color=color.orange, width=2, style=stepline)
plot(2 * pivot - l, "First resistance", color=color.red, width=1, style=stepline)
plot(2 * pivot - h, "First support", color=color.green, width=1, style=stepline)
plot(second ? pivot + (h - l) : na, "Second resistance", color=color.red, width=1, style=circles)
plot(second ? pivot - (h - l) : na, "Second support", color=color.green, width=1, style=circles)

What you see

The orange line is the pivot, the average of the day's high, low and close. The red lines are two resistance levels above it. The green lines are two support levels below it. The first pair is stepped and the second pair is dots.

The levels change once a day, when a day finishes. Use this on an intraday chart, where a day is a coarser bar.

Change these inputs

  • Second levels. Turns the dotted second pair on or off.