The best price a seller is currently asking, available only on tick charts in real time.
ask is a series float with the lowest price at which someone is offering to sell, taken from the top of the order book. It is the price a market buy fills at, and bid is the matching buy side.
It exists only on the 1-tick timeframe. On every other timeframe, and on historical bars, it is na.
Type
series float
Remarks
- The spread, ask minus bid, is a direct measure of how costly it is to trade right now.
- Because it only has values in real time, a script that depends on it has nothing to plot on a loaded chart until new ticks arrive.
- On Sidechair: not supported yet; a script that reads ask stops with the error "ask" isn't defined.
Example
//@version=6
indicator("Spread")
spread = ask - bid
plot(spread, "Spread", color.orange)See also
Not on Sidechair yet