Consolidate setup numbers; clearer staleness message
- Overview Top Setups shows the primary target's probability (concrete,
distance-calibrated) instead of the overlapping confidence number. The
stale 100% confidences were leftovers from the old model and self-heal
on rescan; confidence stays in the detail view + gate.
- Each metric now has one home: composite = ranking, target probability =
actionability, confidence = direction conviction.
- Staleness message states the real basis (% of entry->target distance
already covered), not the raw % from entry, so narrow setups read
correctly ("67% of the move is gone").
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -6,6 +6,13 @@ export function bestTargetProbability(setup: TradeSetup): number {
|
||||
return setup.targets?.length ? Math.max(...setup.targets.map((t) => t.probability)) : 0;
|
||||
}
|
||||
|
||||
/** Probability of the starred primary target (the one the headline R:R refers to). */
|
||||
export function primaryTargetProbability(setup: TradeSetup): number | null {
|
||||
const primary = setup.targets?.find((t) => t.is_primary);
|
||||
if (primary) return primary.probability;
|
||||
return setup.targets?.length ? bestTargetProbability(setup) : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether a setup clears the activation gate. Mirrors the backend predicate in
|
||||
* app/services/qualification.py — keep the two in sync.
|
||||
|
||||
Reference in New Issue
Block a user