Time

<< Click to Display Table of Contents >>

Navigation:  NinjaScript > Language Reference > Common > ISeries<T> > TimeSeries<DateTime> >

Time

Previous page Return to chapter overview Next page

Definition

A collection of historical bar time stamp values.

 

Property Value

An ISeries<DateTime> object.

 

Syntax

Time
Time[int barsAgo] (returns a DateTime structure)

 

 

Examples

ns


// Prints the current bar time stamp
Print(Time[0].ToString());
 
// Checks if current time is greater than the bar time stamp
if (DateTime.Now.Ticks > Time[0].Ticks)
    Print("Do something");