hlc3 - PineScript Variable
Overview
Section titled “Overview”hlc3 computes (high + low + close) / 3, often referred to as the “typical price.” It balances extremes and the closing price, making it a popular source for momentum and volume indicators.
floatQualifier
Section titled “Qualifier”series
Remarks
Section titled “Remarks”- Updates intrabar as soon as
highorlowmakes a new extreme; final value stabilises once the bar closes. - Many volume-weighted indicators (e.g., VWAP) default to this typical price because it captures both range and closing context.
- Swap
closeforhlc3in oscillators to smooth signals without introducing additional lag.
Example
Section titled “Example”//@version=5indicator("HL C3 vs Close", overlay=false)
tp = hlc3plot(close, "Close", color=color.blue)plot(tp, "Typical price (hlc3)", color=color.orange)
plot(ta.ema(tp, 20), "EMA on hlc3", color=color.green)