SecondsFromTime

SecondsFromTime ( int fromTime );

Description

Returns the number of seconds from the specified time (24-hour clock notation) in the EST timezone. Note that this function always returns zero when chart's aggregation period is greater than or equal to 1 day.

Input parameters

Parameter Default value Description
fromTime - Defines time from which seconds are counted, in the HHMM format, 24-hour clock notation.

Example

input OpenTime = 0930;
input DurationHours = 1;

def durationSec = DurationHours * 60 * 60;
def secondsPassed = SecondsFromTime(OpenTime);

plot Price = if secondsPassed >= 0 and secondsPassed <= durationSec then close else double.NaN;

The plot displays the close value based on the specified duration and the beginning in the EST timezone format.

Top