New to the platform. Attempting to do a basic EMA-crossover strategy that liquidates the portfolio at the end of each trading day. Have tried both OnEndOfDay and scheduler (both attached). For some reason it is instead liquidating first thing the next day. Any pointers?

//Scheduler Schedule.On(DateRules.Every(DayOfWeek.Monday, DayOfWeek.Friday), TimeRules.At(15, 59, 30), () => { Log("Daily Liquidation at : " + Time.ToString("o")); Liquidate(); }); //OnEndOfData public override void OnEndOfDay() { // close up shop each day and reset our 'last' value so we start tomorrow fresh Log("End of day liquidating"); Liquidate(); }