Skip to main content

Trades

Trades represent complete trading cycles from entry to exit. UTM automatically creates and manages trades based on order executions.

Understanding Trades

A trade tracks a position from opening to closing:

Signal → Order → Execution → Trade Created

More Executions (scaling in/out)

Final Execution → Trade Closed

Trade vs Order vs Position

ConceptDescription
OrderA single instruction to buy/sell
ExecutionA fill (partial or complete) of an order
TradeA complete lifecycle from entry to exit
PositionCurrent holdings (aggregate of open trades)

Trade Side

Trades have a side indicating the direction:

SideEntry OrderExit OrderProfit When
LongBuySellPrice rises
ShortSell (short)Buy (cover)Price falls

Trade Statuses

StatusMeaning
PendingTrade created, awaiting entry fill. Flips to Open as soon as the linked broker order reports a fill quantity, even before per-fill executions arrive.
OpenPosition is active
Partial CloseSome shares closed, rest still open
ClosedPosition fully closed
ExpiredTrade never filled because the order ran out of time (GTD elapsed, end-of-day expiry)
CancelledTrade never filled because the user or broker explicitly cancelled the signal or order
FailedOrder placement was rejected by the broker
SupersededSignal was re-submitted before any broker activity. The replacement trade carries the live work.

Superseded trades are hidden from list views by default. Filter by Status = Superseded on the Trades page to surface them. Every superseded trade carries supersededByTradeId pointing at its replacement, so the lineage is walkable end to end.

Viewing Trades

Trades Page

Navigate to Trades to see all trades with filters:

  • Status: Open, Closed, or All. The All tab has a multi-select covering every status (pending, expired, cancelled, failed, and superseded as well as open and closed), plus a one-click Did not fill preset that selects the four never-filled statuses (expired, cancelled, failed, and superseded) so you can review every trade that never reached the market at once. Clicking the preset again returns the All tab to the default open and closed view.
  • Account: Filter by one or more connected accounts
  • Symbol: Search by ticker (case-insensitive)
  • Strategy: Filter by one or more strategies
  • Date Range: Entry (opened) date range

The tab counts and the stat cards (open, closed, pending counts plus realised, open, and total P&L) are calculated across every matching trade and update with the account, strategy, symbol, and date filters, so they stay accurate no matter how large your trade history is. The table loads one page at a time.

Row actions

Each trade in the list (both the desktop table and the mobile card) has an actions menu with three items:

  • Edit opens the edit dialog so you can change the strategy and notes (and, for imported trades, the opened and closed timestamps).
  • Close places a market order to flatten the remaining open quantity. It is shown only when the trade still has quantity left to close.
  • View more opens the dedicated trade page.

Clicking anywhere else on the row or card also opens the dedicated trade page.

Trade Details

Open a trade to see:

  • Entry: Orders and executions that opened the position
  • Exit: Orders and executions that closed the position
  • P&L: Realised profit/loss with breakdown
  • Dividend income: Total dividends attributed to this trade (see below)
  • Fees: Per-order and trade-level breakdown of every fee line item the broker reported (see below)
  • Timeline: Complete history of events, including dividend slices attributed to this trade
  • Related Signal: Original signal (if from automation)
  • Strategy: Associated strategy (if any)
  • Broker response: Per-order log of what the broker actually reported (see below)

Trade actions

The trade detail page header has Edit and Close buttons. Edit and Close open the same dialogs as the list row actions, so editing or closing a trade behaves identically from the list and from the detail page. Close is shown only when the trade still has remaining open quantity.

A trade's headline numbers (quantity, average entry and exit prices, realised P&L, and status) are always a pure function of its linked executions. UTM rebuilds them automatically from the execution ledger on every change to the trade's fills, so there is no manual recalculate step to run.

Fees

Each order on a trade detail page shows a Fees block listing every fee line item the broker reported. The trade summary card at the top of the page rolls these up into a trade-level total so you can see at a glance what the position cost in fees.

What you see per line:

  • Commission: the broker's commission charge. Aggregate across legs.
  • Route fee: routing fees the broker reports separately from commission (e.g. TradeStation's UnbundledRouteFee on unbundled equities routing).
  • Regulatory: SEC fees, FINRA Trading Activity Fees (TAF), and any other regulatory line items the broker surfaces. Brokers that report the components separately (e.g. Alpaca's FEE activities) are aggregated here.
  • Total: the sum of the lines above. The trade summary "Total fees" row sums totals across every order on the trade.

A line renders as an em dash (—) when the broker did not report that line. This is deliberate: "not reported" and "reported zero" remain distinguishable. Alpaca equities, for example, are commission-free, so commission renders as $0.00 (the broker reported zero), while a TradeStation order with no unbundled route fee renders the route fee as (the broker did not surface a line).

Non-USD settlement currencies (rare on retail US equities) surface a currency badge alongside the Fees block and a conversion-rate annotation in muted text below the totals row.

The technical mapping of broker fields to UTM columns is documented in the internal broker fee capture survey. The promise behind this view is the same as the broker response timeline: what the broker charged is what UTM stores, and you see the line items the broker did.

Dividend income on the timeline

When the broker pays a dividend on a symbol you hold, UTM splits that dividend pro-rata across the trades that held the position on the record date and attributes the cash to each trade. The trade timeline gets a new "Earned $X from the YYYY-MM-DD AAPL dividend" event for each dividend slice, showing how many shares of that trade lot were held on the record date and the total the broker paid against the whole position.

Dividend income is tracked separately from trading P&L. Both numbers are visible on the trade detail page so you can read "what did this trade make me from trading" and "what did this trade pay me in dividends" as two different answers. Performance > Overview adds a "Trading P&L plus dividends" total when dividend income is non-zero in the current filter.

The full broker activities ledger for an account lives on Accounts > Activities (the document icon next to the sync button).

Broker response timeline

Each order on a trade has a collapsible Broker response section. It shows every observation UTM has captured from the broker for that order: the initial submit response, every sync where the broker state moved, any rejection payload, and any on-demand refresh you triggered.

What you see per row:

  • A friendly status label (for example, "Filled") with the raw broker code in muted text alongside (for example, (FLL)).
  • A source label saying who reported it: "UTM submitted", "TradeStation reported", "Alpaca reported", "Refreshed manually".
  • The timestamp.
  • An expandable "Raw broker fields" sub-section with the broker's allowlisted payload as key-value pairs.

Above the list is a Refresh broker history button. It calls the broker for the order's current state and adds a new entry if (and only if) the broker reports a change since the last entry you have. The button is rate-limited to one call per 60 seconds per order so the broker is not hammered. For TradeStation orders older than 90 days the button is disabled (TradeStation does not retain order history past that window). For Interactive Brokers orders the desktop app must be running with TWS or IB Gateway connected; only open orders refresh on demand, because IB's bulk order endpoint returns open orders only.

If an order has no broker conversation recorded yet (legacy data, or an order that pre-dates this feature), the empty-state shows a "Refresh" button that backfills the current state from the broker.

The promise behind this view is simple: you can always see what the broker actually said, and what UTM did with it. If the two disagree, you can compare them side by side and decide what to do.

P&L Calculation

UTM calculates profit/loss based on trade side:

Long Trades

P&L = (Exit Price - Entry Price) × Quantity

Example: Buy 100 shares at $50, sell at $55

  • P&L = ($55 - $50) × 100 = $500 profit

Short Trades

P&L = (Entry Price - Exit Price) × Quantity

Example: Short 100 shares at $55, cover at $50

  • P&L = ($55 - $50) × 100 = $500 profit

Multiple Executions

For trades with multiple entries/exits, UTM uses average prices:

  • Average Entry Price: Weighted average of all entry fills
  • Average Exit Price: Weighted average of all exit fills

Position Effect

Each execution has a position effect:

EffectMeaning
OpenIncreases position size
CloseDecreases position size

This is determined automatically based on the order action and current position.

Scaling In and Out

Scaling In

Add to an existing position:

  1. Open trade with initial quantity
  2. Send additional signal with same side
  3. UTM adds to the existing trade
  4. Average entry price recalculates

Scaling Out

Partially close a position:

  1. Send close signal with partial quantity
  2. Trade status changes to "Partial Close"
  3. Remaining quantity still open
  4. Realised P&L calculated on closed portion

Automatic Trade Management

From Signals

When a signal executes:

  1. UTM checks for existing open trade in same symbol/account
  2. If found, applies execution to existing trade
  3. If not found, creates new trade

Exit Rules

Signals can include an automatic exit so UTM closes the position after the entry fills:

{
"action": "openLong",
"exitTriggerType": "minutesAfterEntry",
"exitTriggerMinutes": 30,
"exitOrderType": "market"
}

Exit fields:

  • exitTriggerType: scheduling rule for the exit. One of minutesAfterEntry, minutesBeforeClose, atClockTime, or immediate.
  • exitTriggerMinutes: minutes count (0 to 60). Required for minutesAfterEntry and minutesBeforeClose.
  • exitTriggerTime: HH:MM (24-hour) submit time. Required for atClockTime.
  • exitOrderType: market, limit, stop, stopLimit, or moc.
  • exitLimitPrice: limit price (required for limit and stopLimit).
  • exitTimeInForce: day or cls. Must be cls when exitOrderType is moc.

When the entry fills, UTM schedules the exit using these fields. See the Signals Exit Rules section for full examples.

Trade Analytics

Per-Trade Metrics

MetricDescription
Gross P&LProfit/loss before commissions
Net P&LProfit/loss after commissions
Return %Percentage return on entry value
DurationTime from entry to exit

Strategy Aggregation

Link trades to strategies for aggregate performance:

  • Win rate
  • Average win/loss
  • Profit factor
  • Maximum drawdown

See Strategies for details.

Sync Status

Each trade has a sync status that reflects whether UTM's records agree with the broker's current positions.

StatusMeaning
CleanUTM and broker positions match. No action needed.
StaleThe account has not been reconciled recently. Data may be outdated.
DiscrepancyUTM and broker positions do not match. Review the reconciliation page.

Sync status is visible on the trade detail page. It is recalculated each time the account reconciles, which happens automatically after every background sync. You can also trigger a manual sync from the Accounts page to refresh the status immediately.

A trade is considered stale when the account's last reconciliation is older than the configured sync interval. A discrepancy means UTM recorded a different quantity or position than what the broker shows for that symbol.

See Reconciliation for how to resolve discrepancies.

Common Issues

Trade Not Closing

Check:

  • Is the close quantity equal to or less than open quantity?
  • Is the close action correct? (closeLong for long, closeShort for short)
  • Is the trade status still "Open"?

Wrong P&L

Verify:

  • All executions are recorded (check execution history)
  • Commission data is accurate
  • No duplicate executions

A trade's headline numbers (quantity, average prices, P&L, and status) are rebuilt automatically from the execution ledger whenever its fills change, so if the executions are correct the totals will match them. If they still look wrong, the discrepancy is in the executions themselves (a missing, duplicate, or mispriced fill); fix the fills on the reconciliation page and the totals follow.

Missing Trade

Trades are created when orders execute, not when submitted. Check:

  • Order status (must be filled)
  • Execution records exist
  • Symbol and account match