Session Hours and Flat-by-Close Rules: Ending the Trading Day Cleanly
How TradingPact separates entry-window Session hours in your trading pact from per-account Flat by session end notices, cutoffs, and IANA time zones.
Ending a trading day cleanly requires solving two separate failure modes: opening new impulsive trades during dead-liquidity hours, and leaving open afternoon trades exposed across the 17:00 New York rollover spread gap. TradingPact separates these into two distinct controls so Session hours in your trading pact (your rules) controls when entries open, while Flat by session end controls wrapping up open positions before close.
Conflating them causes unpleasant surprises: expecting an entry window rule to close open trades at 16:00, or forgetting DST shifts when relying on raw broker server offsets.
How Session hours and Flat by session end differ
Every entry window and end-of-day rule operates on explicit IANA time zones (such as America/New_York, Europe/London, or Europe/Prague) so US and European daylight saving transitions never shift your window unexpectedly:
| Control | Where it lives | What it checks | Default / options |
|---|---|---|---|
| Session hours | Locked trading pact (1 of 12 rules; Hard or Soft) | Checks [start, end) entry time at Desk Order Review, and once by openedAt on first sight of a direct-MT5 trade | User HH:MM to HH:MM in IANA time zone (supports overnight windows where start > end) |
| Flat by session end | Per-account position protection settings (works independently of auto-breakeven/trailing toggles) | Tracks open positions relative to a daily cutoff time (HH:MM in IANA zone) | Off, Notices only, or Close at market (rolling out account by account) |
Because Session hours evaluates when a trade opens, a position opened legitimately inside [08:00, 16:00) America/New_York is not forcibly closed just because the clock ticks past 16:00. Conversely, if you want a reminder or automatic flatten before daily swap and spread expansion, you turn on Flat by session end separately on that account.
Exact timings, notices, and close windows
When Flat by session end is set to Notices only or Close at market (default cutoff 16:55 America/New_York, 5 minutes ahead of 17:00 rollover):
- Warning notices (
60mand10mprior): If open positions remain, TradingPact sends an early notice60minutes before cutoff and a late notice10minutes before cutoff. - Close window (
0to5minutes past cutoff): WhereClose at marketis selected, automatic session-end closing is active for the account (rolling out account by account; rollout switch currently off by default), the account is connected to Enforce with closing allowed, and the position stream is fresh and synchronized (<= 15seconds), the enforcer sends market-close requests for open positions during the5-minute close window. - Missed-cutoff notice (
5to35minutes past cutoff): If closing did not run because the account is on Monitor, closing is turned off, the stream went stale, or automatic session-end closing is not yet enabled on the account, nothing is closed and TradingPact sends a"could not close"notice across the30-minute after-window so you never assume you are flat when you are still holding risk. - Pending orders note:
Flat by session endacts on open positions; working pending limit or stop orders placed directly in MT5 must still be cancelled deliberately.

Choosing IANA clocks over broker server offsets
Many prop traders break daily and session boundaries not from bad intent, but because broker MT5 servers sit on UTC+2 / UTC+3 (shifting on US vs EU DST transition dates differently than London or Chicago cash opens). Defining both Session hours rules and Flat by session end with IANA zone names keeps your 09:30 New York equity open or 16:55 New York close anchored to exchange reality all year. Compare prop-firm reset boundaries beside UTC and New York time in the Firm Reset Clock, and review Friday market-close boundaries in Weekend holding cutoffs and the trading pause.
What this covers and what it does not
TradingPact is MetaTrader 5 (MT5) only:
- Orders placed on the Desk: Checked pre-trade against
Session hours(Hardrefuses outside the window;Softlogs a warning) before dispatch. - Orders placed directly in MT5: Not blocked pre-trade.
Session hoursevaluatesopenedAtonce on first sight of the position;Flat by session endis rolling out account by account forClose at marketand only closes open positions on Enforce accounts with closing allowed and a live synchronized stream (never on Monitor, never when the stream is stale). - Broader position protection: Partial closes, breakeven moves, trailing stops in
R, and adverse-reduction rules are documented in the Desk Orders, Partials & Position Management Guide and How a prop firm's daily loss line actually works.
- Does the Session hours pact rule close trades open after my session end time?
- No. Session hours governs when new trades may be opened (checked pre-trade on the Desk and judged once by open timestamp on first sight for MT5 trades). If you also want end-of-day notices or market-close flattening, configure Flat by session end on the account.
- What are the default time and notice intervals for Flat by session end?
- Flat by session end defaults to 16:55 America/New_York (5 minutes before FX rollover) with warning notices sent 60 minutes and 10 minutes before your configured cutoff whenever open positions remain.
- Is automatic Close at market enabled for all accounts by default?
- No. Flat by session end starts Off on new accounts, and automatic session-end closing is rolling out account by account behind a rollout switch. When automatic close is not enabled on an account, on Monitor, or if the stream is stale, nothing is closed and a notice is recorded instead.
- Can I weaken Flat by session end while a pact is locked?
- Turning Flat by session end on or tightening from Notices only to Close at market saves immediately. Choosing a weaker mode, a later cutoff time, or another time zone while locked is refused until the lock ends.