Session-end exit¶
A session-end exit closes every open position at a set time of day, whatever the price. Use it when a strategy should not hold overnight, such as an opening-range breakout. Without it, a position stays open until another exit closes it.
Set it in the strategy builder (Create or Edit), under Exit: turn on Session-end exit and choose when. It is on the Standard Exit and the Indicator-Based Exit. Buy and Hold has no exit, so it has no session-end exit.
When it closes¶
- At a clock time: a time in the zone you pick. 15:00 Chicago moves with daylight saving (21:00 UTC in winter, 20:00 UTC in summer). 21:00 UTC stays 21:00 all year. New strategies start on your Settings → Time zone.
- At the end of a session: when that exchange closes in its own city. Tokyo 15:00 Tokyo, London 16:30 London, New York 16:00 New York. New York closes at 21:00 UTC in winter and 20:00 UTC in summer.
The position closes at the first candle close at or after that time (the strategy's main timeframe) and is sold at the start of the next candle, at market.
- 1-hour candles and 21:00: the 20:00–21:00 candle closes at 21:00 and the position is sold then.
- 4-hour candles and 21:00: the first close at or after 21:00 is 24:00, so the position is sold three hours late. The builder warns when the time falls between candles.
- It is a clock time. If the exchange skipped a candle just before it, the position is still sold at the first candle at or after that time, in the backtest and in live trading.
Which days¶
The session-end exit has no days of its own. It follows your Trading hours.
| Your trading hours | The session-end exit runs on |
|---|---|
| A market session (Tokyo, London, New York) | Monday–Friday, or every day with Every day on |
| Custom hours with Weekdays | The days you picked |
| Custom hours without Weekdays | Every day |
| No trading hours, At a clock time | Every day |
| No trading hours, At the end of a session | Monday–Friday (the exchange's days) |
On Monday–Friday hours, a position still open on Friday evening closes on Friday. One opened after Friday's end, or over the weekend if entries allow it, is held until the next trading day's end (Monday).
00:00 is midnight at the end of the day, the same as 24:00. On Monday–Friday hours, a position open at Friday 23:00 closes at midnight between Friday and Saturday.
Custom hours that run past midnight (for example 22:00–02:00): the end falls on the morning after each trading day. An end after midnight, and before any other hours start that day, belongs to the night hours of the day before.
- Exit at 01:00: a Friday position closes at Saturday 01:00.
- Exit at 03:00: it closes at Saturday 03:00, not on Monday.
- With day hours as well (for example 08:00–12:00), an end after they start (11:00 or 15:00) belongs to that day. A Monday 08:00 position closes on Monday.
- An end exactly at the day hours' start (08:00) belongs to the night hours before it. A day position is held about 24 hours, until 08:00 the next day.
With every-day hours, a position opened on Saturday closes on Saturday.
Settings¶
| Setting | Default | What it does |
|---|---|---|
| Session-end exit | off | Close all positions at a time of day. Off: the clock does not close them. |
| Close | At a clock time (at the end of your trading hours' session, if you use one) | At a clock time or At the end of a session. |
| Time | empty (gray 21:00) | At a clock time only. HH:MM from 00:00 to 24:00. |
| Time zone | your time zone | At a clock time only. IANA zones and UTC. |
| Session | New York | At the end of a session only. Tokyo, London, or New York. |
Together with the other exits¶
- Take-profit, stop-loss, a trailing stop, and the other loss controls can still close a position earlier, including inside the last candle before the end.
- If exit conditions are met at the same candle close, and Minimum profit % is reached when you set one, the position closes once, with the reason exit conditions.
- If the time stop is due at the same candle close, the position closes once, with the reason session end.
- Minimum profit % does not hold the session-end exit back. It closes even at a loss.
- With Multiple positions, every open position closes at the end.
- With Trading hours on, an entry that would fill exactly at the end time, or after it, that day is skipped. The log says "Entry skipped: it would fill at or after the session end." Without trading hours, a position opened at or after the end time is held until the next session end.
- If the trade was paused or the app was not running at the end time, the position closes as soon as the trade runs again. The log says "Session-end exit was overdue; closed at the first price after the due time."
Warnings¶
Shown under the session-end exit. They do not block save.
- The time falls between candles of the main timeframe: positions close at the first close after it, up to the delay named (for example 21:00 on 4h closes at 24:00, 3 hours late). A delay that is not whole hours reads like "2 h 30 min".
- Trading hours run past the exit (for example 13:00–22:00 with the exit at 21:00): an entry that would fill at or after it is skipped.
- The exit is before the hours start (for example 22:00–02:00 with the exit at 21:00): positions opened in these hours are held until the next day, up to the hold named. With several windows, the hold is counted from the day's earliest start. If it happens in one season only, the warning names it ("up to 23 hours in summer (mid-March to early November)").
- A window starts after the exit, so it never opens a trade (for example 08:00–12:00 and 22:00–02:00 with the exit at 15:00). If that is only part of the year, the warning names summer or winter ("In summer (mid-March to early November) the {window} hours start after the session end and won't open trades.").
- No trading hours: a position opened after the exit is held until the next session end. Turn on Trading hours to stop entries before it. With a market session, a position opened after Friday's end is held over the weekend until Monday, about 72 hours.
An empty clock time, or a time that is not HH:MM, blocks Save: "Session-end exit is on: set the time (or turn it off)."
Clock changes¶
The time-zone note states the rule for every zone that has daylight saving: a skipped time runs later by the jump, and a time that happens twice is used once, the first time. If an At a clock time zone skips or repeats your time on a daylight-saving day in the next year, the builder also names that day under the time zone. Save still works. Backtests and live trading do the same.