Conditions

In time window

True when the current bar is inside a configurable time window. Internal type - `in_session`.

1 min readUpdated Jun 19, 2026

in_session lets you restrict trading to a specific time-of-day window. The window is defined in hours, with an optional UTC offset for human-readable local-time configuration.

Shape

{
  "type": "in_session",
  "start_hour": 13,
  "end_hour": 21,
  "utc_offset": 0
}

Params

  • start_hour - window start (0-23).
  • end_hour - window end (0-23).
  • utc_offset - local-time offset. 0 means start/end are UTC hours.

Usage

  • Avoid low-liquidity hours like Asian session for FX strategies built for NY hours.
  • Limit to high-impact news windows for event-driven setups.
  • Skip overnight for strategies that don't model overnight risk.

Pitfalls

  • DST handling is on you. UTC is the safest reference for crypto strategies.
  • End hour is inclusive of the bar that starts at end_hour. Verify the bar-edge math by running a few historical bars and reading the trades-table session column.
In time window | Help Center | LucraX · LucraX