Skip to content
Algo Trade Analytics Docs

ohlc4 - Pine Script Variable

Is a shortcut for (open + high + low + close)/4

float

series

  • Represents the average of open, high, low, and close for each bar.
//@version=6
indicator("OHLC4 average", overlay=true)
plot(ohlc4, "OHLC4", color=color.new(color.orange, 0))
plot(ta.ema(ohlc4, 20), "EMA(OHLC4)", color=color.new(color.blue, 0))