Entry order timeout: how many seconds the bot waits for a fill
Updated:
The entry order timeout (the "Wait for the fill, seconds" field) tells the Snapback bot how many seconds to keep its limit sell order for a short before cancelling it if the price never reached the order level.
What it means in plain words
The entry order sits above the market and waits. The timeout is its expiry date. If the price rises within that time and the order fills, the trade is open. If not, the bot removes the order, buys and sells nothing, and the slot is freed.
Why it exists
The pump we wanted to short on a bounce may by then have either kept going up without pausing or dropped for good. An order hanging for hours would open a short in a completely different situation from the one it was planned for. The timeout limits that window.
How it works in the code
A background check in the daemon compares the time the trade was opened with the current time: if more than timeout_sec has passed, the order is considered expired. But expiry is not proof that the entry did not happen: before cancelling, the bot asks the exchange for the real state. If the position is already open (the fill confirmation was simply lost), the bot does not cancel; it restores tracking and places protection. Only if the exchange confirms there is no position is the order cancelled and the trade's state becomes "expired".
Such a trade is recorded with no entry or exit price and with the reason "entry_timeout". It does not count as a zero-result trade.
Illustration of the mechanism only, not advice: the timeout is 300 seconds and the order was placed at 12:00:00. At 12:05:00 the bot checks the exchange. If there is no position, the order is removed.
Allowed values and defaults
- In the wizard: a whole number from 30 to 86400 seconds.
- Default in the configuration: 300 seconds.
What happens if it is longer or shorter
- More seconds: more orders get time to fill, but sometimes at a price when the situation has already changed. The slot and margin stay tied up in waiting for longer.
- Fewer seconds: fewer orders fill, but there are almost no "stale" entries. Many trades will end as "did not fill".
How often an order fills depends on both the distance to the price and the time. That is why the wizard shows them together, in the "How we enter" block. The distance is described in entry price.
How it connects to other settings
- Entry price: the farther the order, the longer you may need to wait.
- Maker-only order: defines how the order may fill.
- The Trades page and exit reasons: that is where you see trades with the reason "entry_timeout".
Common mistakes
- Thinking an unfilled order is a loss. There is no loss; the trade simply did not happen.
- Setting a very short time and wondering why almost no entries fill.
- Forgetting that waiting occupies a slot of simultaneous trades while the order sits.
Where to find it in the bot wizard
The "New bot" or "Edit" form, the "How we enter" block, the "Wait for the fill, seconds" field with the hint "Waiting longer fills more orders but gives a worse entry price."
Frequently asked questions
What happens if my entry order does not fill in time?
The bot cancels the order. No trade is opened, and it is recorded with the exit reason 'entry_timeout' (the entry did not fill in time), with no profit or loss.
How many seconds can I set for the entry wait?
In the wizard from 30 seconds to 86400 (one day). The default in the configuration is 300 seconds.
Is the order cancelled if it has filled partially?
No. If the entry has already filled in part, the bot works with the amount collected and places protection for that amount.
Is a longer wait better or worse?
A longer wait fills more orders, but the entry price may be worse. This trade-off is described in the wizard hint.