# London session entries

The filter names its hours and its time zone. `mode="entries"` blocks new entries outside the window and leaves exits alone, so a position opened inside the window can still close after it.

> **Trap.** Write the window in the zone you mean. London time moves with summer time, and a window written in broker time does not.

## london_session_entries.py

```python
import forge as fg
from forge import param, ta

FORGE_API = 1


class LondonSessionEntries(fg.Strategy):
    bars = fg.bars.Time("H1")
    direction = "long"

    period = param.Int(50, min=10, max=200, step=10)

    def compute(self, d) -> fg.Signals:
        average = ta.sma(d.close, self.period)
        return fg.Signals(
            long_entry=ta.crossover(d.close, average),
            long_exit=d.close < average,
            filters=[
                fg.Filter.session(
                    windows="07:00-17:00", tz="Europe/London", mode="entries"
                )
            ],
        )
```
