Guides

Session & Time Filters

Apply explicit clock rules without assuming a complete exchange calendar or universal gate.

Use the session-aware SJS tutorial for complete source that permits entries during a local-time window while continuing state updates and exits.

Clock time and market sessions differ

Specify the timezone and whether the end boundary is included. A 09:30–10:00 clock window does not independently exclude holidays, weekends, or missing data. Confirm the instrument's session/calendar behavior through sessions and timezones.

The SQX time-window example uses quoted HH:mm:ss comparisons and an explicit timezone. Each complete rule stays on one line; it is observational and does not transmit orders.

Scope the restriction

An entry-only restriction belongs before entry submission, not necessarily at the top of the script. An early return can also suppress exits and state updates. Choose that behavior intentionally.

A configured dayOfWeek primitive is not a universal gate on SJS, L3, or every subsequent action. Its tick callback does not globally stop the strategy, and its day calculation should not be assumed to use the app's selected timezone. Use explicit strategy checks for the behavior you need.

Check boundary cases

Test the exact start and end, an input gap, a position carried beyond entry hours, and the applicable daylight-saving transition. Compare timestamps in the intended timezone rather than relying on chart labels alone.

Continue with SQX syntax and market-data readiness.

On this page