Hi - totally new here. I'm familiar with the basics of python but a bit out of my depth here. I am trying to create a sample first trading bot to learn. I want to:

  • Starting at 9:45am EST
  • Get the price of an Equity, store in variable 
  • Add $5.00 to the that price
  • Make a Market Purchase Order if that price is reached (checking every minute)
I've initialized the equity as such:  self.amzn = self.AddEquity("AMZN", Resolution.Minute)

Is that all I need to initialize? (other than start-end date and setCash)

Does everything else happen in the OnData method? Or Do I need to create a separate MarketOrder method? I can do the logical operations, I'm just confused what the final code might look like in terms of what goes where. I've tried looking at the Demonstration Algorithms but couldn't quite follow. 

Any help is appreciated, thank you.