Bid Ask Spread question

At what time is the bid ask spread from Spread(BarsAgo) or Spread_D(BarsAgo) measured? Is it 15 minutes before the close or something?

It's the closing spread: the spread of the last order before close.