bid - PineScript Variable
Overview
Section titled “Overview”bid holds the highest price a buyer is currently willing to pay. The series only populates on tick charts ("1T"). On higher timeframes it remains na.
Remarks
Section titled “Remarks”- Quote updates appear only when a new tick is processed; off-trade changes are not captured.
- Always check
not na(bid)when working outside tick charts to avoid propagatingna. - Use alongside
askto measure spreads or monitor quote pressure.
Example
Section titled “Example”//@version=5indicator("Bid tracking", overlay=false)
hasQuote = not na(bid)plot(hasQuote ? bid : na, "Bid price", color=color.teal)
plotshape(hasQuote and ta.change(bid) > 0, style=shape.triangleup, color=color.new(color.green, 0), location=location.bottom, title="Bid uptick")