Target selection syncs to chart; stable rail scale; sizing top-right
Deploy / lint (push) Successful in 7s
Deploy / test (push) Successful in 1m4s
Deploy / deploy (push) Successful in 35s

- The ladder target choice is lifted to the ticker page (per
  direction), so selecting a target updates the candlestick overlay's
  target line and zone too, with the R:R for the tooltip taken from
  the ladder row.
- Price rail: the scale now always spans the entire target ladder, so
  stop / entry / now hold their positions and only the target marker
  moves when a different target is selected. The furthest target sits
  at the right edge.
- Setup card layout: position sizing (shares / value / max loss,
  details in the tooltip) and the Mark-as-taken button move to the top
  right of the card header row, next to the stats they belong with -
  the dangling bottom row is gone.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-07-10 12:52:18 +02:00
co-authored by Claude Fable 5
parent 9f56a25f2d
commit 16121042cd
3 changed files with 89 additions and 39 deletions
+5 -2
View File
@@ -43,15 +43,18 @@ export function RBar({ r, max = 1.6 }: { r: number | null; max?: number }) {
/* ------------------------------------------------------------------ */
export function PriceRail({
direction, entry, stop, target, current,
direction, entry, stop, target, current, scaleTo,
}: {
direction: string;
entry: number;
stop: number;
target: number;
current: number | null;
/** Extra prices the scale must span (e.g. every target in the ladder), so
* switching targets moves the target marker, not stop/entry/now. */
scaleTo?: number[];
}) {
const points = [entry, stop, target, ...(current != null ? [current] : [])];
const points = [entry, stop, target, ...(current != null ? [current] : []), ...(scaleTo ?? [])];
const span = Math.max(...points) - Math.min(...points) || 1;
const lo = Math.min(...points) - span * 0.06;
const hi = Math.max(...points) + span * 0.06;