I want to run my strategy on autopilot 24/7/365, this is why I want it to handle all potential and possible errors that could lead to immediate stop.
in addition to handling overnight through disabling "on session close" and making the strategy to "keep running" during connection loss and few other things, now I want my strategy to keep running but to ALWAYS check carefully if
DateTime.Now
// Print all holidays included in the Bars object's Trading Hours template foreach(KeyValuePair<DateTime, string> holiday in TradingHours.Holidays) { Print(holiday); } // Print all partial holidays included in the Bars object's Trading Hours template foreach(KeyValuePair<DateTime, PartialHoliday> hol iday in TradingHours.PartialHolidays) { Print(holiday); }
if (DateTime.Now is a Weekend or a holiday) { bool isFreeDay = true; }
Print(sessionIterator.GetTradingDayEndLocal(sessionIterator.ActualSessionEnd));
Print(sessionIterator.GetTradingDayEndLocal(sessionIterator.ActualTradingDayExchange));
Thank you
Comment