Overall Statistics
import datetime

class BasicTemplateAlgorithm(QCAlgorithm):

    def Initialize(self):

        self.SetStartDate(2019,1,7)  #Set Start Date
        self.SetEndDate(2019,1,7)    #Set End Date
        self.SetCash(100000)           #Set Strategy Cash
        self.AddForex("EURUSD", Resolution.Minute)
        self.testOrder: OrderTicket

    def OnData(self, data):

        qb = data["EURUSD"]
        
        if qb.Time.hour != 9:
            return
        
        self.Debug(" Bar Time: " + str(qb.Time) + " Last price = " + str(qb.Close) + " High Price = " + str(qb.High))
        if self.Transactions.OrdersCount == 0:
            self.StopLimitOrder("EURUSD", 100000, qb.Close + 0.0015, qb.Close + 0.0100)
            self.Debug("Sent order: Buy 100k EURUSD stop: " + str(qb.Close + 0.0015) + " limit " + str(qb.Close + 0.0100))
        
    def OnOrderEvent(self, orderEvent):
        order = self.Transactions.GetOrderById(orderEvent.OrderId)
        self.Debug("{0}: {1}: {2}".format(self.Time, order.Type, orderEvent))