Skip to content

ask - PineScript Variable

ask returns the lowest price an active seller is willing to accept at the moment of the current tick. The series is only populated on tick charts ("1T"); on higher timeframes it yields na.

  • Values update only when a new tick arrives. Quote changes without trades are not reflected.
  • Because the series is na outside tick charts, guard calculations with not na(ask) or provide fallbacks.
  • Pair with bid to compute spreads or monitor quote depth changes.
//@version=5
indicator("Bid-ask spread monitor", overlay=false)
spread = not na(ask) and not na(bid) ? ask - bid : na
plot(spread, "Spread", color=color.orange)
bgcolor(spread > nz(spread[1]) ? color.new(color.red, 85) : na,
title="Expanding spread highlight")