I am trying to get the price for an equity at the start of the day to use during the day for a trading strategy.

In the Initialize section I have::

self.Schedule.On(self.DateRules.EveryDay(), self.TimeRules.At(9,30,1), Action(self.openPrice))

And then the function:

    def openPrice(self):

       self.googopen = float(self.Securities["GOOG"].Price)

I have a log running and the value I get at 9.31 is Zero.

If I run the script over two days I get the closing price of day one in day two.

I appreciate I am extremely new to this and it is a case of not understanding the structure of the data but have got stuck.