# Why did my order not fill?

> Seven reasons, each with the rule behind it.

Source: https://algobarsx.com/docs/why-no-fill/

- **It was created on the last bar.** A market order fills at the next bar's open. With no next bar it is reported as unfilled ([E1](https://algobarsx.com/docs/rules-timing/#E1)).
- **Price never reached it.** A buy limit fills when the low is at or below its price, a buy stop when the high is at or above it. Sells mirror that ([E4](https://algobarsx.com/docs/rules-fills/#E4)).
- **It expired.** `expires: 10 bars` cancels at the close of the tenth bar after it was placed ([E17](https://algobarsx.com/docs/rules-trade-management/#E17)).
- **A limit rejected it.** `max_open`, `max_open_per_side`, `pyramiding`, `max_total_risk` and `min_distance` are checked when the entry would fill. A rejected entry is recorded with its reason ([E19](https://algobarsx.com/docs/rules-strategy-controls/#E19)).
- **It was outside trading hours.** With `trade_only`, entries are only created inside the listed sessions ([E22](https://algobarsx.com/docs/rules-strategy-controls/#E22)).
- **A loss guard had tripped.** After `max_daily_loss`, new entries are rejected until the next UTC day ([E20](https://algobarsx.com/docs/rules-strategy-controls/#E20)).
- **There was already a trade the other way.** The default for `opposite` is `ignore` ([E18](https://algobarsx.com/docs/rules-strategy-controls/#E18)).
