Skip to content

Feature Request: Partial Exit Analytics — Hit Rates, Conditional Rates & Avg Exit per Partial #273

@electricar

Description

@electricar

I created this text with the help of AI to make it as comprehensive as possible.
I'm wondering what you think about it, please let me know.

Background:

TradeTally stores individual partial executions in the executions[] array for every trade. This data is currently only used to calculate aggregate P&L and average exit price. Traders using partial exit strategies need to understand how each partial position performs across many trades — which partials are profitable, how often price reaches each level, and whether the final runner is being managed effectively.

All required data already exists in TradeTally. No new data entry is needed.

Worked Example:

Consider this single MES trade stored in TradeTally:
Entry: buy 12 MES @ 6000.00
stopLoss: 5992.50 (= −7.5 pts)

executions:
sell 3 @ 6007.00 ← P1, +7.0 pts
sell 2 @ 6017.00 ← P2, +17.0 pts
sell 1 @ 6050.00 ← P3, +50.0 pts
sell 6 @ 6000.25 ← P4, +0.25 pts (BE)

From this single trade, the feature derives:

  • P1: profitable (+7.0 pts, R = +0.93)
  • P2: profitable (+17.0 pts, R = +2.27)
  • P3: profitable (+50.0 pts, R = +6.67)
  • P4: BE/scratch (+0.25 pts ≤ 1 tick threshold)

Across 20 such trades, the feature aggregates these into the analytics table below.

What Should Be Calculated:

For each partial index (P1, P2 … Pn) across a filtered set of trades:

1. Absolute hit rate

Trades where Partial n was profitable ÷ trades with at least n partials

2. Conditional hit rate (P2 onwards)

Trades where Partial n was profitable ÷ trades where Partial n−1 was profitable

This distinguishes whether a later partial underperforms because the entry is weak (low P1 rate) or because price stalls between partials.

3. Exit breakdown per partial

  • Count: Profitable / BE/Scratch / Loss
  • Avg exit in pts — all exits
  • Avg exit in pts — profitable exits only
  • Avg R at exit — all exits (only where stopLoss is set)
  • Avg SL in pts — average stop distance across eligible trades for that partial (derived as abs(entryPrice − stopLoss), only where stopLoss is set)

How to Derive Partials from Existing Data:

For each trade:

  1. Filter executions to exits only: action = sell for long, action = buy for short
  2. Sort exit executions by datetime ascending
  3. Assign partial index: first exit = P1, second = P2, etc.
  4. Calculate pts from entry:
  • Long: exit_price − entry_price
  • Short: entry_price − exit_price
  1. Classify each exit:
  • Profitable: pts > instrument tick size
  • BE/Scratch: pts within ±1 tick of zero
  • Loss: pts < −1 tick

Tick size: 0.25 pts for MES, ES, MNQ, NQ. Use stored instrument tick size where available.

Handling Mixed Partial Counts:

Trades in the same filter set may have 2, 3, or 4 partials. Apply one uniform rule:
For partial index Pn, the eligible trade set = all trades with at least n exit executions. The denominator for Pn = count of those eligible trades.

Example with 20 trades (some with 2, some with 3, some with 4 partials):

  • P1 eligible: 20 trades (all)
  • P2 eligible: 20 trades (all had at least 2 exits)
  • P3 eligible: 11 trades (only those with 3+ exits)
  • P4 eligible: 6 trades (only those with 4 exits)

No special role labels (first/middle/last) needed. The same formula applies to every partial index. Optionally add a subtle "last" badge to the row where the partial represents the final exit in the majority of its eligible trades — visual only, no separate logic.

Display Format:

Image

Reading this table: the P4 row with 0% profitable exits and 75% BE/scratch immediately reveals that the runner is never capturing a profit — it sits at breakeven and never trails. The Avg SL column lets traders verify whether their stop distance is consistent across partials and over time, and whether it differs between setups or sessions.

  • Trades without stopLoss: show pts columns, leave R and Avg SL columns blank
  • Trades with only 1 exit execution: exclude entirely
  • "last" badge is visual only

Filter Dimensions:

All metrics filterable by:

  • Instrument / underlying asset
  • Date range
  • Strategy
  • Any existing trade tag
  • Number of partials (e.g. "only trades with exactly 4 partials") — useful for analysing a specific structure in isolation

Why This Matters:

Without this feature, traders must manually export the JSON backup and process executions[] externally. With 83 trades and 206 individual execution rows already stored in a typical TradeTally export, this analytics view would be immediately populated with zero additional input from the user.

No new fields, no new data entry, no changes to the import pipeline are required.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions