GetTime

GetTime ();

Description

Returns the number of milliseconds since the epoch (January 1, 1970, 00:00:00 GMT).

Example

def isRollover = GetYYYYMMDD() != GetYYYYMMDD()[1];

def beforeStart = GetTime() < RegularTradingStart(GetYYYYMMDD());
def vol = if isRollover and beforeStart then volume else if beforeStart then vol[1] + volume else Double.NaN;
plot PreMarketVolume = vol;

On an intraday chart, this script will plot the cumulative pre-market volume for the charted symbol.