TimeValue
Overview
Values
Time Range
Values
Example Usage
// Define trading session start and end times
const sessionStartTime = TimeValue["09:00"];
const sessionEndTime = TimeValue["17:00"];
// Use in indicator parameter
this.api.RegOption("Session Start", TOptionType.TIME_ONLY, this.SessionStart);
// Check if current bar time matches a specific time
const barTime = this.api.Time(index);
const timeOfDay = this.getTimeOfDayString(barTime);
if (timeOfDay === TimeValue["09:30"]) {
// Perform action at market open
}
// Set alert time
const alertTime = TimeValue["15:45"];Last updated