# Time in force

Time in force is an order instruction that specifies how long an order remains eligible for execution before it expires or is canceled.

## What it means

An order needs an expiration rule as well as a side, quantity and, where applicable, a price limit. Its **time-in-force** instruction supplies that rule. It affects whether an unfilled order can remain open and whether a partial execution is allowed; it does not set the execution price.

Common choices include:

| Instruction | What happens to an unfilled quantity |
| --- | --- |
| Day | It expires at the end of the applicable trading day or session if not filled. |
| Good-til-canceled (GTC) | It remains eligible until filled or canceled, subject to the broker’s maximum duration and other rules. |
| Immediate-or-cancel (IOC) | Any quantity that cannot execute immediately is canceled; a partial fill is possible. |
| Fill-or-kill (FOK) | The entire quantity must execute immediately, or the order is canceled without a fill. |

Availability and precise handling depend on the broker, exchange, order type and trading session. For example, confirm how a broker treats an order entered outside regular market hours rather than assuming that “day” always means midnight.

## How it is calculated

Time in force is an instruction, **not a numerical metric**, so it has no general-purpose formula. For an IOC order, the remaining shares can be expressed as `canceled shares = submitted shares − immediately filled shares`, where **submitted shares** is the order quantity in shares and **immediately filled shares** is the quantity executed promptly in shares. The result, also in shares, is canceled rather than left open. For FOK, the filled quantity is either the full submitted quantity or zero.

## Worked example

Suppose, hypothetically, an investor enters a **limit order to buy 100 shares at no more than US$20.00 per share**. At the moment the order reaches the market, only 40 shares are available for immediate execution at US$20.00 or less. Assume no other eligible shares become available immediately.

1. **IOC:** The order fills 40 shares. The other `100 − 40 = 60` shares are canceled. The order may therefore leave the investor with a partial position.
2. **FOK:** Because all 100 shares cannot execute immediately, the order is canceled. It fills zero shares.
3. **Day:** The 40 shares might fill, with 60 remaining eligible until the applicable session ends, subject to the broker’s handling. Any unfilled remainder then expires.
4. **GTC:** The unfilled portion might remain eligible beyond that day, subject to the broker’s duration limits and cancellation rules.

These are simplified outcomes, not a claim about any specific broker or venue. The limit price caps the purchase price per share; time in force governs how long, and in some cases under what completeness condition, the order can execute.

## Why it matters before you trade

An order left open can execute later, when the market or the investor’s circumstances have changed. An order that expires quickly may avoid that exposure but leave part or all of the intended quantity unfilled. IOC and FOK also express different tolerances for partial fills. Neither instruction guarantees an immediate execution: eligible liquidity and the order’s other conditions still matter.

Before submitting an order, distinguish **price conditions** from **duration conditions**. Check the broker’s supported combinations, session rules, expiration time and treatment of partially filled orders. After submission, verify the order status and any fills with the broker; an order being sent does not mean it executed.

## How PreTrAIde uses it

PreTrAIde lets a user build a stock basket with a side, quantity and execution conditions for each line. Its **pre-trade analysis** returns a GO, NO-GO or MODIFY verdict and a suggested execution strategy, with reasoning, before an order is placed. The product facts do not specify which time-in-force instructions PreTrAIde supports or whether it assigns one. A time-in-force check therefore belongs with the execution conditions a user confirms with their broker.

PreTrAIde is analysis software, not a broker: it does not receive, transmit or execute orders. Its verdicts are decision support, not recommendations.

## Common mistakes

- Treating GTC as indefinite. Brokers can impose expiration limits or cancel orders under their rules.
- Assuming IOC means the entire order fills. It permits a partial fill and cancels the rest.
- Confusing FOK with a day order. FOK requires an immediate full fill; a day order can remain eligible during its applicable session.
- Assuming a limit price guarantees a fill. It restricts the execution price, but eligible shares may never become available.
- Forgetting to check an order’s status. A partial fill or an open remainder can change what quantity is still outstanding.

---
Source: https://pretraide.com/glossary/time-in-force
