Learn
Lesson · Backtesting and Trading Systems

Trade Execution Simulation

Model market, limit, stop, stop-limit, target, and cancellation behavior using prices that could realistically execute in the tested sequence.

Review concepts
Core concepts

What to understand

Keep each definition operational so it can be implemented and tested.

1

Order eligibility

The order becomes active only after its submission event.

2

Fill condition

Price touching a level does not always prove the full order could execute there.

3

Intrabar ambiguity

When stop and target are both inside one bar, the sequence is unknown without finer data.

Interactive lab

Order and Fill Simulation Lab

Select an order type, gap condition, and intrabar assumption. Inspect the simulated fill, exit, and R-multiple.

Order and Fill Simulation Lab

Deterministic synthetic educational data · no live market connection

BACKTEST MODEL
Process

Separate signal from execution

Each simulated order needs a lifecycle.

1

Submit

Record time, side, type, quantity, and constraints.

2

Match

Apply eligible prices, spread, liquidity, and queue assumptions.

3

Resolve

Fill, partially fill, cancel, expire, stop, or target the order.

Knowledge check

Check your understanding

Select one answer for each question. Feedback appears immediately.

1. A buy limit below the market guarantees:

2. If a bar touches both stop and target, daily OHLC alone tells you:

3. A stop-market order after a gap may fill:

4. A long position has its stop at 100.00. The next bar opens at 98.50 and never trades above 99.00. The simulated exit is:

Practical rules

  • Use order-specific fill logic.
  • Use conservative handling for unresolved intrabar order.
  • Model partial fills or capacity limits when size matters.

Common mistakes

  • Filling every touched limit order completely.
  • Assuming stops always execute at the stop price.
  • Allowing orders to fill before submission.
References

Official reading

The labs are simplified simulations. These sources cover historical performance, data, costs, or execution limitations.

FINRA · Common Questions About Online Trading
Explains that market orders can fill away from quoted prices and limit orders may not execute.

Open official reference ↗

CME Group · Trading Simulator
Provides a practice environment for testing trading decisions without live capital.

Open official reference ↗

Kept in this browser only, for you. Nothing is sent anywhere and nothing checks it. Carry it to another device.

Feedback and recommendations

Something to change about this lesson? Write it down, tick it off when it is handled, and export the list when you want to act on it. Kept in this browser only: nothing is sent anywhere, and nobody is notified.

No recommendations yet for this lesson.