How are pending orders triggered in a simulated environment?
Quick answer
Pending orders, such as buy limit, sell limit, buy stop and sell stop, wait at a set price and are converted into positions when the market reaches that level. In a simulator, each new price tick is checked against every resting order, and orders whose level is reached are filled at the live price.
Detailed answer
The four standard pending order types behave differently:
- Buy limit: waits below the market and buys when the ask falls to the level or lower.
- Sell limit: waits above the market and sells when the bid rises to the level or higher.
- Buy stop: waits above the market and buys when the ask rises to the level or higher.
- Sell stop: waits below the market and sells when the bid falls to the level or lower.
Fill prices
A limit order triggers only when the market has come to it, so it fills at the level or better. A stop order triggers when the market moves through it, so in a fast move or gap it fills at the first available price beyond the level.
Rules at the moment of triggering
A resting order placed days ago may no longer fit the account's situation when it triggers. Margin may be committed elsewhere, or a position limit may already be reached. A good platform checks the rules again when the order triggers, not only when it was placed. Otherwise a pending order becomes a way to open a position that would have been refused as a market order.
PropExecutor supports all four pending order types, triggers them from the live price feed, fills them at the live executable price, and runs every triggered order through the same rule and margin checks as a market order inside the transaction that opens the position.
PropExecutor team · Updated
Related questions
All 17 questions in Market data and simulated execution · Every category