Time-Based Conditions
Time-based conditions let your strategy make decisions based on when an event occurred rather than just what the event contains. You can check the hour, minute, day of week, or whether the event falls inside a specific market session — all interpreted in the timezone of your choice.
If you want to block events entirely outside specific hours, use Strategy Activation — it's a pre-execution gate that drops events before they reach your strategy. Use time conditions when you want time logic inside your strategy — for example, "only take entries after 10:00 AM but still track candles before that."
Selecting the Time Source
When building a condition (inside a guard or conditional action step), each operand has a source selector. The available sources are:
| Source | What It References |
|---|---|
| Static | A fixed value you type in. |
| Context | A custom variable from your strategy's context. |
| Event | A field from the incoming market event (close, high, volume, etc.). |
| Indicators | An output from a subscribed indicator. |
| Indicator Events | A boolean result from an indicator event (crossover, trend). |
| Time | A component of the event's timestamp, interpreted in a chosen timezone. |
Select Time to access time-based fields.
Time Fields
After selecting the Time source, choose a field to extract from the event's timestamp:
| Field | Range | Description |
|---|---|---|
| hour | 0–23 | The hour in the chosen timezone (24-hour format). |
| minute | 0–59 | The minute within the hour. |
| minuteOfDay | 0–1439 | Minutes since midnight (e.g., 9:30 AM = 570). Useful for precise time-of-day comparisons. |
| dayOfWeek | 1–7 | Day of the week where 1 = Monday and 7 = Sunday. |
| dayOfMonth | 1–31 | Day of the month. |
| month | 1–12 | Month of the year (1 = January). |
| year | (four digits) | The calendar year. |
| Session Active | true / false | Whether the event falls inside a selected market session. |
Choosing a Timezone
Every time field is interpreted relative to a timezone you select. The timezone picker shows all IANA timezones grouped by region (Americas, Europe, Asia, Pacific, etc.) with current UTC offsets.
The timezone determines how the event's epoch timestamp is decomposed into local calendar components. For example, an event at epoch 1711555200 (UTC 2024-03-27 16:00) becomes:
- America/New_York: hour = 12, minuteOfDay = 720
- Europe/London: hour = 16, minuteOfDay = 960
- Asia/Tokyo: hour = 1 (next day), minuteOfDay = 60
Always pick the timezone of the market or session you're reasoning about.
Session Membership Checks
When you select the Session Active field, an additional Session selector appears. Pick from 13 built-in market sessions covering major exchanges and forex windows.
The condition returns true if the event's timestamp falls inside the session's open–close window (accounting for the session's configured timezone and overnight wrap), or false otherwise.
Example condition: Session Active (NYSE Regular Hours) == true — fires only when the event occurred during NYSE trading hours (9:30 AM – 4:00 PM Eastern).
Examples
Only transition after 10:00 AM New York time
Left operand: Time → minuteOfDay → America/New_York
Operator: >=
Right operand: Static → 600
10:00 AM = 600 minutes after midnight. The condition passes for any event at or after 10:00 AM Eastern.
Only transition on weekdays
Left operand: Time → dayOfWeek → (any timezone)
Operator: <=
Right operand: Static → 5
Monday = 1, Friday = 5. The condition passes for Monday through Friday.
Only transition during NYSE Regular Hours
Left operand: Time → Session Active → NYSE Regular Hours
Operator: ==
Right operand: Static → true
The session check handles the timezone and open/close times automatically.
Only transition in the afternoon (after 12 PM London time)
Left operand: Time → hour → Europe/London
Operator: >=
Right operand: Static → 12
Combining Time Conditions with Other Sources
Time conditions use the same condition system as all other sources. You can combine them freely:
- In an All (AND) group:
RSI < 30 AND minuteOfDay >= 570— oversold AND after 9:30 AM. - In an Any (OR) group:
Session Active (NYSE) == true OR Session Active (LSE) == true— during either session. - Across groups: AND group for entry conditions + OR group for acceptable sessions.
What's Next
- Market Sessions Reference — full list of built-in sessions with timezones and hours
- Strategy Activation — pre-execution gating based on time windows
- Conditions — the full condition system (all operand sources, operators, guard structure)