TimeZoneInfo

View as Markdown

Definition

Indicates a time zone that is configured by a Trading Hours template

Property Value

A TimeZoneInfo object that represents the time zone for a configured Trading Hours template.

Syntax

Bars.TradingHours.TimeZoneInfo

Examples

1// Print the timezone before printing all sessions
2Print(String.Format("All sessions are in {0}", Bars.TradingHours.TimeZoneInfo));
3
4// Print details for all sessions in the Trading Hours template
5for (int i = 0; i < TradingHours.Sessions.Count; i++)
6{
7 Print(String.Format("Session {0}: {1} at {2} to {3} at {4}", i, TradingHours.Sessions[i].BeginDay, TradingHours.Sessions[i].BeginTime,
8 TradingHours.Sessions[i].EndDay, TradingHours.Sessions[i].EndTime));
9}