import { useMemo } from 'react'; import { Link } from 'react-router-dom'; import { useActivation } from '../hooks/useActivation'; import { useTrades } from '../hooks/useTrades'; import { useWatchlist } from '../hooks/useWatchlist'; import { usePerformance } from '../hooks/usePerformance'; import { Callout } from '../components/ui/Callout'; import { Section } from '../components/ui/Section'; import { SkeletonCard, SkeletonTable } from '../components/ui/Skeleton'; import { formatPrice } from '../lib/format'; import { recommendationActionLabel } from '../lib/recommendation'; import { qualifiesSetup, activationSummary, primaryTargetProbability, expectedValueR } from '../lib/qualification'; import type { TradeSetup } from '../lib/types'; function fmtR(value: number | null): string { if (value === null) return '—'; return `${value > 0 ? '+' : ''}${value.toFixed(2)}R`; } function rColor(value: number | null): string { if (value === null) return 'text-gray-400'; if (value > 0) return 'text-emerald-400'; if (value < 0) return 'text-red-400'; return 'text-gray-300'; } function Metric({ label, value, sub, valueClass = 'text-gray-100' }: { label: string; value: string; sub?: string; valueClass?: string; }) { return (
{label}
{value}
{sub &&{sub}
}{today}
| Ticker | Dir | Entry | R:R | Target Prob | Exp. Value | Action |
|---|---|---|---|---|---|---|
|
{setup.symbol}
{isTopPick && (
Top pick
)}
|
{formatPrice(setup.entry_price)} | {setup.rr_ratio.toFixed(1)}:1 | {(() => { const p = primaryTargetProbability(setup); return p != null ? `${Math.round(p)}%` : '—'; })()} | {fmtR(ev)} | {recommendationActionLabel(setup.recommended_action)} |