NinjaScript > Language Reference > Data >

Time

Print this Topic Previous pageReturn to chapter overviewNext page

Definition

A collection of historical bar time stamp values.

 

Property Value

A TimeSeries type object.

 

Syntax

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

 

 

Examples

// 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");