The opening price of the current bar.
open is a series float holding the first traded price of each bar. open[1] is the previous bar's open.
Once a bar has started, its open does not change, in history or live. Gaps show up as the difference between open and close[1].
Type
series float
Remarks
- open[n] is na before the first bar of the chart.
- A strategy order sent on one bar fills at the open of the next bar, so open is the price a market order normally gets.
Example
//@version=6
indicator("Opening gap")
gap = open - close[1]
plot(gap, "Gap", gap >= 0 ? color.green : color.red, style = plot.style_columns)
hline(0)See also
Runs on Sidechair