Problem:
When OnBarUpdate() is called in Realtime CurrentBar is pointing to the last closed bar. NT has received the first tick of the next bar (which I call bar-being-built). So the latest price (of the dataseries' MarketDataType) is in GetOpen(CurrentBar+1) but Close[0] might be days out of date (say if market has just opened after a weekend break).
When in Historical the current substitution of the out-of-date Close[0] is causing all sorts of problems. These problems might only be noticed once per day after session break (since intra-day bars usually have no opening gap), so the problems are most noticeable if using a BarsPeriodType.Day datasouce.
Suggested solution:
a) Change the documentation to say something like
Here's a quote from Ray (CEO) which backs up what I am saying
If this change is made it should probably be done in the same release as the suggested fix for the problematic 'historic stop order price check rule'. This is because user strategies often use GetCurrentBid() minus some ticks to assign a price for a stop order on a Long (for example), and both GetCurrentBid() and the Historical stop order rule are currently looking at the same (potentially days out-of-date price).
Sidenote:
Comment