Skip to content

hlcc4 - PineScript Variable

hlcc4 is shorthand for (high + low + close + close) / 4. It weights the close twice while still accounting for the bar’s range, creating a smoother series than the raw close.

float

series

  • Useful when you want to dampen intrabar spikes without losing the influence of the close.
  • Because the close appears twice, the value tracks closing moves more closely than hl2 or hlc3.
  • Like other derived prices, it updates intrabar when extremes shift and finalises after the bar closes.
//@version=5
indicator("HLCC4 smoothing", overlay=false)
plot(close, "Close", color=color.blue)
plot(hlcc4, "HLCC4", color=color.orange)
plot(ta.sma(hlcc4, 14), "HLCC4 SMA", color=color.green)