For the complete documentation index, see llms.txt. This page is also available as Markdown.

Early Exits during Holidays and Weekends

For both backtesting and automation, OO can close a trade prior to expiration, without having to rely on a stop loss or profit target. This can be done through the Early Exit setting, which closes the entire trade, or the Time Actions setting, which closes portions of the trade.

Early exits can be specified as DTE (Days to Expiration), DIT (Days In Trade) and MIT (Minutes In Trade). While MIT (Minutes in Trade) is used for intraday management1, DTE and DIT exits can sometimes fall on days the market is closed, such as holidays and weekends. OO uses different logic to select DTE and DIT dates when trading cannot occur on the "true" DTE or DIT.

The following table shows the difference between DTE and DIT date selection over a holiday, New Year’s Day, as well as a weekend. In this example, a 7 DTE trade opens on Tuesday, 30 Dec 2025, and expires on Tuesday, 06 Jan 2026. The DTE and DIT columns show the "true" value, and the Early Exit Date columns show the value that OO would select if the "true" value lands on a market closure.

Date
Event
DTE
Early Exit Date (DTE)
DIT
Early Exit Date (DIT)

Tue 30 Dec 25

Opening Trade

7

Tue 30 Dec 25 (7 DTE)

0

Tue 30 Dec 25 (0 DIT)

Wed 31 Dec 25

6

Wed 31 Dec 25 (6 DTE)

1

Wed 31 Dec 25 (1 DIT)

Thu 01 Jan 26

Closed for New Years

5

Wed 31 Dec 25 (6 DTE)

2

Fri 02 Jan 26 (3 DIT)

Fri 02 Jan 26

4

Fri 02 Jan 26 (4 DTE)

3

Fri 02 Jan 26 (3 DIT)

Sat 03 Jan 26

Closed for Weekend

3

Fri 02 Jan 26 (4 DTE)

4

Mon 05 Jan 26 (6 DIT)

Sun 04 Jan 26

Closed for Weekend

2

Mon 05 Jan 26 (1 DTE)

5

Mon 05 Jan 26 (6 DIT)

Mon 05 Jan 26

1

Mon 05 Jan 26 (1 DTE)

6

Mon 05 Jan 26 (6 DIT)

Tue 06 Jan 26

Expiration Day

0

Tue 06 Jan 26 (0 DTE)

7

Tue 06 Jan 26 (7 DIT)

Early Exit - DTE

  • When an Early Exit with DTE is used, OO will close the trade by the specified number of days prior to expiration day.

  • If the calculated date falls on a holiday or weekend, OO will select the closest date, while biasing an earlier exit / greater DTE where needed. For example:

    • If an option expires on Tuesday, 06 Jan 26, and a 2 DTE early exit is specified that lands on a weekend (Sunday), OO will select Monday, 05 Jan 26 (1 DTE) rather than Friday, 02 Jan 26 (4 DTE) to exit.

      • If Monday is a holiday (three day weekend), OO will select the next Tuesday2.

    • If an option expires on Tuesday, 06 Jan 26, and a 3 DTE early exit is specified that lands on a weekend (Saturday), OO will select Friday, 02 Jan 26 (4 DTE) rather than Monday, 05 Jan 26 (1 DTE) to exit.

      • If Friday is a holiday (three day weekend), OO will select the previous Thursday2.

    • If an option expires on Tuesday, 06 Jan 26, and a 5 DTE early exit is specified that lands on a holiday (New Year's Day, Thursday, 01 Jan 26), OO will select Wednesday, 31 Dec (6 DTE) rather than Friday, 02 Jan 26 (4 DTE)

  • The logic for selecting the exit date looks at whole days, rather than the exit time. Once the date is selected, the early exit will initiate at the specified time.

Early Exit - DIT

  • When an Early Exit with DIT is used, OO will close the trade only after the specified number of days in trade.

  • If the calculated date falls on a holiday or weekend, OO will select the closest date that ensures a minimum of the specified DIT has been fulfilled, so the DIT value serves as a trade duration floor.

    • If a trade opens on Tuesday, 30 Dec 25, and a 5 DIT early exit is specified that lands on a weekend (Sunday), OO will select Monday, 05 Jan 26 (6 DIT).

    • If a trade opens on Tuesday, 30 Dec 25, and a 4 DIT early exit is specified that lands on a weekend (Saturday), OO will still select Monday, 05 Jan 26 (6 DIT) rather than Friday, 02 Jan 26 (3 DIT), to ensure the trade was open at least 4 days.

    • If a trade opens on Tuesday, 30 Dec 25, and a 2 DIT early exit is specified that lands on a holiday, New Year’s Day, Thursday, 01 Jan 26, OO will select Friday, 02 Jan 26 (3 DIT) rather than Wednesday, 31 Dec 25 (1 DIT) to ensure the trade was open at least 2 days.

  • The logic for selecting the exit date looks at whole days, rather than the exit time. Once the date is selected, the early exit will initiate at the specified time.

Notes

  1. Early exit via Minutes In Trade (MIT) should be limited to 0DTE / intra-day trades only. Using a Minutes In Trade value that extends past market close of the day can result in unpredictable trade management behavior.

  2. During three day / holiday weekends, a "tie" scenario can occur where the specified DTE lands on the 2nd day of a 3-day market closure period. OO first applies the weekend check logic, which may land on the holiday, then selects the closest date from there using the holiday date selection logic.

  3. When CSV Signal files are used and the Use CSV Exit Times setting is enable, Early Exit and Time Actions are ignored. Exits are determined by the dates/times on the CSV file.

Last updated