|
static TimeSpan | GetNextLiveAuxiliaryDataDueTime () |
| Helper method to get the new live auxiliary data due time More...
|
|
static TimeSpan | GetNextLiveAuxiliaryDataDueTime (DateTime utcNow) |
| Helper method to get the new live auxiliary data due time More...
|
|
static int | GetSecondUnevenWait (int waitTimeMillis) |
| Helper method to adjust a waiting time, in milliseconds, so it's uneven with the second turn around More...
|
|
static int | GetSecondUnevenWait (this DateTime now, int waitTimeMillis) |
| Helper method to adjust a waiting time, in milliseconds, so it's uneven with the second turn around More...
|
|
static DateTime | UnixTimeStampToDateTime (double unixTimeStamp) |
| Create a C# DateTime from a UnixTimestamp More...
|
|
static DateTime | UnixTimeStampToDateTime (decimal unixTimeStamp) |
| Create a C# DateTime from a UnixTimestamp More...
|
|
static DateTime | UnixTimeStampToDateTime (long unixTimeStamp) |
| Create a C# DateTime from a UnixTimestamp More...
|
|
static DateTime | UnixMillisecondTimeStampToDateTime (decimal unixTimeStamp) |
| Create a C# DateTime from a UnixTimestamp More...
|
|
static DateTime | UnixNanosecondTimeStampToDateTime (long unixTimeStamp) |
| Create a C# DateTime from a UnixTimestamp More...
|
|
static double | DateTimeToUnixTimeStamp (DateTime time) |
| Convert a Datetime to Unix Timestamp More...
|
|
static double | DateTimeToUnixTimeStampMilliseconds (DateTime time) |
| Convert a Datetime to Unix Timestamp More...
|
|
static long | DateTimeToUnixTimeStampNanoseconds (DateTime time) |
| Convert a Datetime to Unix Timestamp More...
|
|
static double | TimeStamp () |
| Get the current time as a unix timestamp More...
|
|
static TimeSpan | Max (TimeSpan one, TimeSpan two) |
| Returns the timespan with the larger value More...
|
|
static TimeSpan | Min (TimeSpan one, TimeSpan two) |
| Returns the timespan with the smaller value More...
|
|
static DateTime | Max (DateTime one, DateTime two) |
| Returns the larger of two date times More...
|
|
static DateTime | Min (DateTime one, DateTime two) |
| Returns the smaller of two date times More...
|
|
static TimeSpan | Multiply (this TimeSpan interval, double multiplier) |
| Multiplies the specified interval by the multiplier More...
|
|
static DateTime | ParseDate (string dateToParse) |
| Parse a standard YY MM DD date into a DateTime. Attempt common date formats More...
|
|
static DateTime | ParseFIXUtcTimestamp (string dateToParse) |
| Parse a standard YY MM DD date into a DateTime. Attempt common date formats More...
|
|
static IEnumerable< DateTime > | DateTimeRange (DateTime from, DateTime thru, TimeSpan step) |
| Define an enumerable date time range using the given time step More...
|
|
static IEnumerable< DateTime > | EachDay (DateTime from, DateTime thru) |
| Define an enumerable date range and return each date as a datetime object in the date range More...
|
|
static IEnumerable< DateTime > | EachTradeableDay (ICollection< Security > securities, DateTime from, DateTime thru) |
| Define an enumerable date range of tradeable dates - skip the holidays and weekends when securities in this algorithm don't trade. More...
|
|
static IEnumerable< DateTime > | EachTradeableDay (Security security, DateTime from, DateTime thru, bool extendedMarketHours=false) |
| Define an enumerable date range of tradeable dates - skip the holidays and weekends when securities in this algorithm don't trade. More...
|
|
static IEnumerable< DateTime > | EachTradeableDay (SecurityExchangeHours exchange, DateTime from, DateTime thru, bool extendedMarketHours=false) |
| Define an enumerable date range of tradeable dates - skip the holidays and weekends when securities in this algorithm don't trade. More...
|
|
static IEnumerable< DateTime > | EachTradeableDayInTimeZone (SecurityExchangeHours exchange, DateTime from, DateTime thru, DateTimeZone timeZone, bool includeExtendedMarketHours=true) |
| Define an enumerable date range of tradeable dates but expressed in a different time zone. More...
|
|
static bool | TradableDate (IEnumerable< Security > securities, DateTime day) |
| Make sure this date is not a holiday, or weekend for the securities in this algorithm. More...
|
|
static int | TradeableDates (ICollection< Security > securities, DateTime start, DateTime finish) |
| Could of the number of tradeable dates within this period. More...
|
|
static DateTime | GetStartTimeForTradeBars (SecurityExchangeHours exchangeHours, DateTime end, TimeSpan barSize, int barCount, bool extendedMarketHours, DateTimeZone dataTimeZone, bool dailyPreciseEndTime=false) |
| Determines the start time required to produce the requested number of bars and the given size More...
|
|
static DateTime | GetEndTimeForTradeBars (SecurityExchangeHours exchangeHours, DateTime start, TimeSpan barSize, int barCount, bool extendedMarketHours) |
| Determines the end time at which the requested number of bars of the given will have elapsed. NOTE: The start time is not discretized by barSize units like is done in GetStartTimeForTradeBars More...
|
|
static int | GetNumberOfTradeBarsInInterval (SecurityExchangeHours exchangeHours, DateTime start, DateTime end, TimeSpan barSize) |
| Gets the number of trade bars of the specified barSize that fit between the start and end More...
|
|
static double | NormalizeInstantWithinRange (DateTime start, DateTime current, TimeSpan period) |
| Normalizes the current time within the specified period time = start => 0 time = start + period => 1 More...
|
|
static double | NormalizeTimeStep (TimeSpan period, TimeSpan stepSize) |
| Normalizes the step size as a percentage of the period. More...
|
|
static TimeSpan | Abs (this TimeSpan timeSpan) |
| Gets the absolute value of the specified time span More...
|
|
|
static readonly DateTime | EndOfTime = new DateTime(2050, 12, 31) |
| Provides a value far enough in the future the current computer hardware will have decayed :) More...
|
|
static TimeSpan | EndOfTimeTimeSpan = new TimeSpan(EndOfTime.Ticks) |
| Provides a time span based on EndOfTime More...
|
|
static readonly DateTime | Start = new DateTime(1998, 1, 2) |
| Provides a common and normalized start time for Lean data More...
|
|
static readonly DateTime | BeginningOfTime = DateTime.FromOADate(0) |
| Provides a value far enough in the past that can be used as a lower bound on dates, 12/30/1899 More...
|
|
static readonly TimeSpan | MaxTimeSpan = TimeSpan.FromDays(1000*365) |
| Provides a value large enough that we won't hit the limit, while small enough we can still do math against it without checking everywhere for TimeSpan.MaxValue More...
|
|
static readonly TimeSpan | OneYear = TimeSpan.FromDays(365) |
| One Year TimeSpan Period Constant More...
|
|
static readonly TimeSpan | OneDay = TimeSpan.FromDays(1) |
| One Day TimeSpan Period Constant More...
|
|
static readonly TimeSpan | OneHour = TimeSpan.FromHours(1) |
| One Hour TimeSpan Period Constant More...
|
|
static readonly TimeSpan | OneMinute = TimeSpan.FromMinutes(1) |
| One Minute TimeSpan Period Constant More...
|
|
static readonly TimeSpan | OneSecond = TimeSpan.FromSeconds(1) |
| One Second TimeSpan Period Constant More...
|
|
static readonly TimeSpan | OneMillisecond = TimeSpan.FromMilliseconds(1) |
| One Millisecond TimeSpan Period Constant More...
|
|
Time helper class collection for working with trading dates
Definition at line 30 of file Time.cs.