Refine probability distribution price labels

This commit is contained in:
2569718930@qq.com
2026-04-21 23:27:31 +08:00
parent 193af17726
commit c40b7c54e3
+20 -18
View File
@@ -742,6 +742,12 @@ export function ProbabilityDistribution({
: locale === "en-US" : locale === "en-US"
? "YES" ? "YES"
: "YES"; : "YES";
const yesDisplayPrice = linkedMarketBucket ? linkedMarketAsk : yesPriceView?.ask;
const noDisplayPrice = linkedMarketBucket ? linkedNoAsk : noPriceView?.ask;
const yesDisplayEdge = linkedMarketBucket
? linkedMarketEdge
: yesPriceView?.edge;
const noDisplayEdge = linkedMarketBucket ? linkedNoEdge : noPriceView?.edge;
const hasPriceAnalysis = const hasPriceAnalysis =
isToday && isToday &&
(Boolean(priceAnalysis?.available) || (Boolean(priceAnalysis?.available) ||
@@ -794,11 +800,11 @@ export function ProbabilityDistribution({
const actionNote = const actionNote =
actionableEdge != null && actionableEdge >= 0.02 actionableEdge != null && actionableEdge >= 0.02
? locale === "en-US" ? locale === "en-US"
? "model above ask" ? `${formatSignedPercent(actionableEdge)} vs ask`
: "模型高于买价" : `相对买价 ${formatSignedPercent(actionableEdge)}`
: locale === "en-US" : locale === "en-US"
? "read-only signal" ? `${preferredSideLabel} ${formatSignedPercent(actionableEdge)}`
: "只读信号"; : `${preferredSideLabel} ${formatSignedPercent(actionableEdge)}`;
return ( return (
<section className="prob-section"> <section className="prob-section">
@@ -884,25 +890,21 @@ export function ProbabilityDistribution({
<em>{actionNote}</em> <em>{actionNote}</em>
</div> </div>
<div> <div>
<span>{locale === "en-US" ? "Buy price" : "买入价格"}</span> <span>{locale === "en-US" ? "YES price" : "YES 价格"}</span>
<strong>{toPriceCents(preferredPriceView?.ask) || "--"}</strong> <strong>{toPriceCents(yesDisplayPrice) || "--"}</strong>
<em> <em>
{linkedMarketBucket {locale === "en-US"
? locale === "en-US" ? `edge ${formatSignedPercent(yesDisplayEdge)}`
? "matched bucket" : `优势 ${formatSignedPercent(yesDisplayEdge)}`}
: "已匹配桶"
: marketScan?.available
? locale === "en-US"
? "primary market"
: "主盘口"
: marketScan?.reason || "--"}
</em> </em>
</div> </div>
<div> <div>
<span>{locale === "en-US" ? "Model edge" : "模型优势"}</span> <span>{locale === "en-US" ? "NO price" : "NO 价格"}</span>
<strong>{formatSignedPercent(preferredPriceView?.edge)}</strong> <strong>{toPriceCents(noDisplayPrice) || "--"}</strong>
<em> <em>
{quoteSourceLabel} {locale === "en-US"
? `edge ${formatSignedPercent(noDisplayEdge)}`
: `优势 ${formatSignedPercent(noDisplayEdge)}`}
</em> </em>
</div> </div>
</div> </div>