When using the SessionIterator to get the current exchange date using the GetTradingDay() method, gives next day's date. I am need to get the current session date of the exchange and not the local time. Am I doing something wrong?
See code extract below;
if (State == State.Historical) { sessionIterator = new SessionIterator(BarsArray[0]); } protected override void OnBarUpdate() { string DateofDay = "\n-------------" +"\n " + sessionIterator.GetTradingDay(DateTime.Now).ToString("dd MMM yyyy"); }
Comment