Why did my order not fill?
Seven reasons, each with the rule behind it.
- 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).
- 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).
- It expired.
expires: 10 barscancels at the close of the tenth bar after it was placed (E17). - A limit rejected it.
max_open,max_open_per_side,pyramiding,max_total_riskandmin_distanceare checked when the entry would fill. A rejected entry is recorded with its reason (E19). - It was outside trading hours. With
trade_only, entries are only created inside the listed sessions (E22). - A loss guard had tripped. After
max_daily_loss, new entries are rejected until the next UTC day (E20). - There was already a trade the other way. The default for
oppositeisignore(E18).