I'm trying to understand real time and historical behavior of GetBid() and the wording is a bit confusing (https://ninjatrader.com/support/help...tml?getbid.htm). I understand that for real time bid/ask prices we should use GetCurrentBid(), but then my confusion is on the difference between GetBid(CurrentIndex) and Close[0] for historical calculations? Ultimately, I'm writing a function that returns the most appropriate bid/ask price based on the State variable.
Also, if Close[0] returns the historical bid price, then what is the analog for historical ask price?
Example:
GetBidPrice()
{
if (state == realtime)
return GetCurrentBid();
return GetBid(CurrentBar) or Close[0]
}

Comment