Target selection syncs to chart; stable rail scale; sizing top-right
- 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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user