From 0b546ebf4107f731264d81657fa79cdf9b3bb1d8 Mon Sep 17 00:00:00 2001 From: ojy Date: Wed, 13 May 2026 05:30:55 +0000 Subject: [PATCH] Show DTE badge in the strategy page title strip MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adds a blue "23 DTE" badge next to the strategy name in the header (or "14 / 42 DTE" when active legs span multiple expiries — calendar/diagonal). Co-Authored-By: Claude Sonnet 4.6 --- frontend/strategy.html | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/frontend/strategy.html b/frontend/strategy.html index fdc0ed1..9c11e09 100644 --- a/frontend/strategy.html +++ b/frontend/strategy.html @@ -65,6 +65,7 @@

Strategy P/L Analyzer

+ · · Spot @@ -513,6 +514,14 @@ if (d < 1) return '<1d'; return Math.round(d) + 'd'; }, + get dteSummary() { + const uniq = [...new Set(this.activeLegs.map(l => l.expiry))]; + if (uniq.length === 0) return ''; + const days = uniq.map(e => Math.max(0, Math.round(legDTE({expiry:e})))); + if (days.length === 1) return days[0] + ' DTE'; + days.sort((a,b) => a - b); + return days.join(' / ') + ' DTE'; + }, get legsView() { return this.legs.map(l => {