Underlying overlay on "Equity of the day"
Status (2026-11-09): built, not deployed. Visual only: strategy execution, entry / exit prices, MTM, charges, the equity curve, max profit, max drawdown, lowest point and the drawdown chart are exactly as before; the CSV export is unchanged (time, pnl, drawdown).
- Data:
tbs/dayview.pyday_curvenow also returnsspot={default, series: {UNDERLYING: [price per minute]}, labels}on the same minute timestamps ast/mtm. It is the index spot close of the day's loaded bars (DayData.spot, read in the same pass as the option bars: no extra load, no extra API call; the client already caches the day). Spot is never mixed with futures. A minute the underlying has no bar for isnull: nothing is carried across a gap and no later minute is used. A basket on two underlyings (NIFTY and SENSEX) returns both, with a selector. - Chart (
pages/tbsDayCharts.jsx,DayDetailDialog): the equity line (yellow, unchanged) is the foreground on the right axis; the underlying is a thin grey-blue line at about 40% opacity behind it on its own left axis, so the P&L scale is never distorted. Toggles Strategy Equity / Underlying Price, display Actual Price / % Change (from the first valid price of the session; default Actual Price, remembered in the browser). One tooltip shows the timestamp, strategy P&L, underlying price and its % change from the session open.