I have set the start date as 2020-01-01 and the end date at 2020-01-02, but the algo makes orders before 2020-01-01.

Can someone explain why and how can I change the script to avoid orders before 2020-01-01 (I know I can use self.Time to avoid trading before 2020-01-01, but I don't understand why it trades in the first place)?

Bonus question, I want to reset open and high prices on the rolling window every 4 hours. It seems that it doesn't work as expected in my algo.