> ## Documentation Index
> Fetch the complete documentation index at: https://docs.trinigence.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Time & Session Logic

> How time-based conditions, sessions, and schedules work inside Trinigence strategy logic.

## What time and session logic is

Time and session logic lets you use **time as a condition**.

It can be used as:

* a **filter** (restrict entries to certain times)
* a **condition** (trigger behavior at specific times)
* a **risk control** (limit exposure windows)

Unlike indicators, time logic is not derived from price - it’s derived from the clock.

***

## The most common use: entry filters

Most strategies use time logic to restrict *when entries are allowed*.

Examples:

```text theme={null}
Trade only on weekdays.
Trade only during the London session.
Do not open new trades on weekends.
```

If the time condition is not met:

* entry logic is skipped
* open trades continue normally

<Info>
  Time filters typically affect entries, not exits.
</Info>

***

## Weekday logic

Weekday logic restricts trading to specific days.

Examples:

```text theme={null}
Trade only on Monday, Wednesday, Thursday, and Friday.
Do not trade on Saturday and Sunday.
```

Use cases:

* avoiding weekend volatility
* focusing on days with better liquidity
* matching a tested routine

***

## Time-of-day logic

Time-of-day logic restricts trading to specific hours.

Examples:

```text theme={null}
Only trade between 08:00 and 20:00 UTC.
Do not open trades after 22:00 UTC.
```

Use cases:

* avoiding low-liquidity hours
* excluding high-risk periods
* aligning with your workflow

***

## Session logic

Session logic defines trading windows based on common market sessions.

Examples:

```text theme={null}
Trade only during the London and New York sessions.
Avoid the Asian session.
```

Sessions are useful because:

* liquidity is higher
* spreads tend to be tighter
* price movement is more consistent

<Warning>
  Session boundaries must be interpreted relative to timezone.
</Warning>

***

## Timezone behavior

Trinigence evaluates time-based conditions using:

* the strategy’s configured timezone (when defined)
* otherwise a safe default (shown to the user)

Best practice:

* always specify timezone when session rules matter

Example:

```text theme={null}
Use UTC for all session filters.
```

***

## Using time as a trigger (advanced)

Time logic can also be used as a direct trigger.

Examples:

```text theme={null}
Close any open trade at 23:00 UTC.
Do not hold positions over the daily close.
```

These must be expressed explicitly as **exit logic**, not just filters.

<Card title="Exit logic" icon="arrow-right-from-bracket" href="/strategy-structure/exit-logic" horizontal>
  Learn how time conditions become exits.
</Card>

***

## Combining time logic with indicators

Time logic is often combined with indicator filters.

Example:

```text theme={null}
Trade only during London session AND only when the 4h trend is bullish.
```

This creates:

* fewer trades
* higher selectivity
* more controlled behavior

***

## Defaults and assumptions

If time logic is:

* explicit → applied exactly
* implied (e.g. “weekdays only”) → inferred conservatively
* ambiguous → ATI asks for clarification

<Card title="What Trinigence fills automatically" icon="robot" href="/writing-ideas/what-trinigence-fills-automatically" horizontal>
  See how time assumptions are handled.
</Card>

***

## Common mistakes

<AccordionGroup>
  <Accordion title="Assuming filters close trades">
    Time filters restrict entries. Exits must be defined separately.
  </Accordion>

  <Accordion title="Ignoring timezone">
    The same session window means different things in different timezones.
  </Accordion>

  <Accordion title="Over-restricting trading hours">
    Narrow schedules can eliminate all trades on certain markets/timeframes.
  </Accordion>
</AccordionGroup>

***

## Best practices

* Use schedules to control exposure
* Be explicit about timezone
* Start with simple weekday rules
* Add sessions only when you know why

<Card title="Schedule & filters" icon="calendar-days" href="/strategy-structure/schedule-and-filters" horizontal>
  See how time logic fits into strategy structure.
</Card>

***

## What to read next

<CardGroup cols={2}>
  <Card title="Schedule & filters" icon="calendar-days" href="/strategy-structure/schedule-and-filters">
    Time logic inside structure.
  </Card>

  <Card title="Operators & conditions" icon="code-branch" href="/indicators-logic/operators-and-conditions">
    Combine time and indicators.
  </Card>

  <Card title="Crossovers & trend changes" icon="shuffle" href="/indicators-logic/crossovers-and-trend-changes">
    Event logic comparisons.
  </Card>

  <Card title="Indicators overview" icon="wave-square" href="/indicators-logic/overview">
    Return to the big picture.
  </Card>
</CardGroup>

<Note>
  Time filters reduce noise.\
  Timezone clarity prevents surprises.
</Note>
