# Checking Executions and Allocating them to Trades
## Overview
Quick reference for the day-to-day workflow of pulling executions from IB and booking them into a trade.
Two windows are involved: **Orders** (the Execution Log tab) and **Trade Allocations**.
Trade Allocations now carries its own **Symbol** selector, auto-loads executions when opened, lets you register a brand-new trade on the fly while allocating, and lets you curate exactly which fills go into a trade via the checkbox column — see the How To below for the fast path.
---
## How To (step-by-step)
1. Open **Trade Allocations** (main toolbar, or **Go to Allocations** / **Allocations** from the Orders window).
2. Pick the **Account** and **Symbol** in the toolbar — the Symbol dropdown lists your Watchlist symbols and defaults to whatever symbol is current on the main window.
3. Executions load automatically the first time the window is activated for that symbol with nothing showing yet. If you switch symbols, or nothing came back, click **Load Execs** to (re)pull them.
4. In the executions grid, **untick** the checkbox on any row that shouldn't be allocated — e.g. real fills placed directly in TWS that have nothing to do with a SOAP-managed trade. Only ticked rows (and ticked legs within a combo) get staged.
5. Click **Select Exec Records** to move the ticked rows into the staging grid, or just skip this — clicking Allocate will auto-stage them if the staging grid is still empty.
6. Pick the destination trade:
- Click an existing trade's **row** in the Trades grid, **or**
- Select the **New Trade** placeholder row and type a name into the trade-name box.
7. Click **Allocate to Trade**. If you picked the New Trade placeholder, the trade is registered/saved automatically as part of this step — no separate "Validate Trade Name" click needed.
---
## 1. Pull executions into the Orders window
1. Open the **Orders** window (toolbar / menu). It has tabs for Live Orders, Completed Orders, and **Execs** (the executions log).
2. Set filters at the top if needed (account, date, sec type, exchange, client id) — the date dropdown limits results to "All available" or a specific day within the last 7 days (IB only retains 7 days of executions).
3. Click **Refresh Executions** (or use the menu *Request Executions*) to request an execution report from IB. Fills stream into the grid, and commission/realized P&L follow separately shortly after.
4. Combo (BAG) parent rows are shown grayed out and unchecked automatically — only the individual option legs are allocatable.
5. Executions are auto-checked as they arrive. Untick any rows you don't want to act on yet.
**Offline / historical executions:** new executions are appended to a per-symbol CSV cache (deduplicated by IB's ExecId). Use **Load Saved Execs** to reload that cache into the grid later, e.g. after IB's 7-day execution window has passed.
---
## 2. Two ways to allocate
### A. Quick allocate, straight from the Execs tab
1. Tick the rows you want (checkbox column) — right-click shows a running count in the status bar.
2. Right-click a ticked row: a context menu lists existing trades for the current symbol plus a **New Trade** option.
- Picking an existing trade opens a submenu of that trade's current Trade Log entries (for reference) and an **Add Execs to TLog below** action, which books the ticked execs straight in.
- **New Trade** creates a new trade name, gathers the ticked rows, and saves them to that trade.
3. This is the fast path when you already know which trade the fills belong to.
### B. Full allocation workflow via Trade Allocations
Use this when you need to review/curate before booking, or handle combo legs explicitly. See the How To section above for the short version; details:
1. From Orders, click **Go to Allocations** (or open Trade Allocations from the main toolbar / the **Allocations** button).
2. Pick the **Symbol** from the toolbar dropdown if it isn't already the one you want — this filters which trades show in the Trades grid and which execs get pulled. Changing it clears the current exec/staging grids (so you don't accidentally mix fills from two symbols) and triggers its own fresh auto-load.
3. **Load Execs**: pulls executions for the selected symbol into the allocation grid (same request as in Orders). This also fires automatically the first time the window is shown for a given symbol with nothing loaded yet. Existing Trade Log entries — e.g. loaded from a ONE report import — can also be listed here via **Load ONE TLog**.
4. **Curate with the checkbox column**: every row is ticked by default (except combo/BAG header rows, which are informational only and start unticked). Untick anything that shouldn't be part of this allocation — e.g. unrelated fills placed directly in TWS. Only ticked rows are staged; for a combo, only ticked legs/fills feed the aggregated leg quantity, price, and commission.
5. Select the fills to allocate (**Select Exec Records**, or just proceed to step 6 and let it auto-stage). This copies the ticked rows into the staging grid:
- Plain legs are copied 1:1.
- Combo (BAG) fills are **collated**: all ticked legs sharing the combo's ConId across multiple partial fills are summed into one row per leg (weighted average price, total qty, total commission/P&L).
6. Pick the destination trade in the **Trades** grid (one row per trade for the current account, plus a "New Trade" placeholder row):
- Click an **existing trade's row** to target it directly.
- Select the **New Trade** placeholder row and type a name into the trade-name box to create a new one.
7. Click **Allocate to Trade**. This:
- If the selected row is still the unsaved New Trade placeholder (blank Id), **registers it on the fly** — assigns a trade number, adds it to the trade list, and saves the trade list to disk — no separate "Validate Trade Name" click required.
- Builds the list of execution records from the staged rows.
- Resolves the trade number.
- Appends to the in-memory Trade Log for that trade if one is already loaded.
- Unchecks the source rows in the execution grid so they can't be double-allocated by mistake.
8. This saves the allocation, dedup'd by ExecId with a backup copy taken before writing, flips the trade's status from empty to active the first time it receives fills, refreshes the trade log dictionaries, and sets the trade as current.
---
## 3. Trade list housekeeping
- The account's trade list itself (name/status/etc., not the fills) is saved automatically on window close, or manually via **Save Trade List**.
- **Renaming a trade** (double-click its cell in the Trades grid and type a new name) renames its trade file on disk and pervades everywhere: the master trade list is updated, any currently open Options Analysis (OA) window for that symbol has its trade dropdown and active selection refreshed, and the Trade List window picks up the change next time it's brought to front. Renaming to a name already used by another trade is rejected (status bar shows "already exists") rather than silently colliding.
---
## Notes / gotchas
- Executions are keyed by IB `ExecId` everywhere — re-sent execs (e.g. IB replay after reconnect) update the existing row/record in place rather than duplicating it.
- The checkbox column is the actual curation mechanism for the Trade Allocations exec grid — an unticked row (or unticked leg/fill within a combo) is excluded from allocation, not just visually deselected.
- A trade must have a real name (not the placeholder "New Trade" row left untouched) and a valid account before anything will save.
- If you delete rows from the Execs Log grid (Delete key), the corresponding entries are removed from the recent-executions cache too — this does **not** touch anything already saved/allocated.
Related:
- [Trade List Guide](./TradeList.md.html)
---
Go back to the main [SOAP2 Help Guide](index.md.html).