// Trading view — full layout with candlestick chart + privacy fog function TradingView() { const [reveal, setReveal] = React.useState(false); // synthesized candlesticks for XAU const candles = React.useMemo(() => genCandles(60, 2380, 3.2), []); return (
} />
{/* Chart card */}
XAU / USD · 1h
2,384.10
+9.84 (+0.42%)
{["1m","5m","1h","4h","1D"].map((t, i) => ( ))}
{/* Astro transit overlay */}
{!reveal && }
{[ { l: "Open", v: "2,374.26" }, { l: "High", v: "2,389.11" }, { l: "Low", v: "2,371.03" }, { l: "Vol 24h", v: "182.4k" }, { l: "Realized vol", v: "12.8%" }, ].map((k, i) => (
{k.l}
{k.v}
))}
{/* Side panel */}
XAG / USD
28.91
−0.18%
Sentry signals · 24h
4
{[ { t: "XAG realized vol → 38.2%", s: "above 35% threshold", tone: "warn", when: "2s" }, { t: "XAU paper long · 0.25 @ 2,384.10", s: "stop 2,368 · TP 2,402", tone: "info", when: "8m" }, { t: "Friday AM fix logged", s: "2,391.05 · PM pending", tone: "ok", when: "31m" }, { t: "Mercury sq. Jupiter noted", s: "observed, no action", tone: "info", when: "2h" }, ].map((s, i) => (
{s.t}
{s.s}
{s.when}
))}
Astrological transit · 21 Apr
Mercury square Jupiter · waxing gibbous · Venus in Taurus. Sentry notes a mild risk-on bias; the charter says we log, we do not act.
☿ □ ♃ ♀ in ♉ waxing
{/* Ledger */}
Paper ledger
Today's orders
Time
Agent
Side
Sym
Entry
Stop · TP
Size
PnL
{[ { t: "14:01:12", a: "Market Sentry", side: "LONG", sym: "XAU", e: "2,384.10", sl: "2,368 · 2,402", sz: "0.25", pnl: "+0.12" }, { t: "11:28:04", a: "Market Sentry", side: "SHORT", sym: "XAG", e: "29.10", sl: "29.40 · 28.80", sz: "1.00", pnl: "+0.19" }, { t: "09:04:57", a: "Tape Reader", side: "LONG", sym: "XAU", e: "2,376.40", sl: "2,368 · 2,395", sz: "0.10", pnl: "+0.08" }, ].map((r, i) => (
{r.t}
{r.a}
{r.side}
{r.sym}
{r.e}
{r.sl}
{r.sz}
{r.pnl}
))}
); } function genCandles(n, base, vol) { const out = []; let price = base; for (let i = 0; i < n; i++) { const o = price; const c = price + (Math.random() - 0.5) * vol * 3; const h = Math.max(o, c) + Math.random() * vol; const l = Math.min(o, c) - Math.random() * vol; out.push({ o, h, l, c }); price = c; } return out; } function Candles({ candles, width, height }) { const pad = 20; const W = width, H = height; const min = Math.min(...candles.map(c => c.l)); const max = Math.max(...candles.map(c => c.h)); const range = max - min || 1; const step = (W - pad*2) / candles.length; const y = (v) => pad + (1 - (v - min) / range) * (H - pad*2); return ( {/* grid */} {[0.25, 0.5, 0.75].map(f => ( ))} {/* envelope */} `${i?"L":"M"}${pad + i*step + step/2} ${y((c.h + c.l)/2)}`).join(" ") + ` L ${W-pad} ${H-pad} L ${pad} ${H-pad} Z`} fill="url(#c-fill)" /> {candles.map((c, i) => { const x = pad + i*step + step/2; const up = c.c >= c.o; const color = up ? "oklch(0.78 0.15 155)" : "oklch(0.68 0.20 25)"; return ( ); })} {/* price label */} 2,384.10 ); } function AstroOverlay() { return (
{[ { l: "☿ □ ♃", t: "Mercury square Jupiter" }, { l: "☾ ↑", t: "Waxing gibbous" }, ].map((a) => (
{a.l}
))}
); } function FogLabel() { return (
privacy fog · hover or toggle reveal
); } // ---- Settings ---- function SettingsView() { return (
); } function SettingsGroup({ title, lines }) { return (
{title}
{lines.map((l, i) => (
{l.k}
{l.v}
{l.toggle ? ( ) : ( · )}
))}
); } window.TradingView = TradingView; window.SettingsView = SettingsView;