The stock exchange normally opens at 9 so ýou can not know the open of the day when you call that function in a morning bar. Only in a later bar you can know the open of the day. Hope I made sense?