Repository navigation
feat: add OMX Copenhagen 25 (OMXC25) to the Indices tab, off by default - #6
Open
knightmare2600 wants to merge 3 commits into
Open
knightmare2600 wants to merge 3 commits into
knightmare2600 wants to merge 3 commits into
Conversation
user-preferences.example.json has shipped MapStyle, MapProjection and MapOverlays since the map overhaul, but nothing read them: the map always started on Earth at Night / Flat / Day-Night, and Save-UserPreferences rewrote the file with a fixed key set, deleting the three keys on the first save. There is no save on window close (it minimises to the tray), so map changes were never persisted. - Save-UserPreferences now writes MapStyle, MapProjection and MapOverlays from the current toolbar state. - The style and projection pickers and the ten overlay toggles save when changed, as the exchange toggles already do. - Saved settings are applied straight after the pickers are populated, before change handlers are attached, so start-up does not redraw the map once per toggle. - New Private/Get-MapPreferenceState resolves the saved values. Unknown styles/projections fall back to the defaults; overlay names with no toggle (e.g. 'TimeLine' from the original example file) are ignored; an empty MapOverlays list means all overlays off; a missing key keeps the XAML defaults. - PSExchangeClock.psm1 now dot-sources Private/*.ps1 (not exported). - Pester tests in Tests/MapPreferences.Tests.ps1. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Adds Nasdaq Copenhagen (Nasdaq København) as the 21st exchange, using the existing exchange, holiday, map, flyout, world-clock and preference mechanisms. It is not active by default; existing saved selections are left unchanged. Exchange - Code XCSE, symbol OMXC, Copenhagen, Denmark, DKK, 55.6761 / 12.5683. - TimeZoneId 'Romance Standard Time' (Windows ID that .NET maps from IANA Europe/Copenhagen); CET/CEST comes from the OS timezone rules. - Main-market equities 09:00-17:00 local. New optional exchange fields OpeningAuctionStart (08:45) and ClosingAuctionStart (16:55) make the status read "Opening auction - opens in ..." and "Closing auction - ends in ..." instead of presenting the call phases as pre-market or continuous trading. Status values, colours and notifications are unchanged. The flyout lists both auction windows. - Sources: Nasdaq European Markets Trading Hours and Holiday Schedule (https://www.nasdaq.com/european-market-activity/trading-hours) and the Nasdaq INET Nordic Auctions factsheet 1015-26. Holidays - holidays.json gains the official Nasdaq Copenhagen equity closures for 2025-2027 (checked 2026-10-09). Nasdaq lists no Copenhagen half days. These differ from Danish public holidays (24 and 31 December are exchange closures). Later years are not yet published. Supporting changes - Exchange status logic moved from the dashboard into Private/Get-ExchangeSessionStatus.ps1 (behaviour preserved) so it can be tested without WPF. Countdowns are now measured in UTC, so they stay correct on DST transition days. Format-CountdownSpan replaces the inline countdown formatting. - Private/Test-ExchangeActive holds the existing saved-selection logic. - Get-StockExchangeData appends built-in exchanges missing from a cache younger than 30 days, without overwriting cached entries, so existing installs see the new exchange without -ForceRefresh. - README, about help, docs and manifest description updated (20 -> 21 exchanges); README's ActiveExchanges default corrected to the seeded example list. - Pester tests: sessions, auctions, weekends, holidays, CET/CEST transitions, machine-timezone independence, missing holiday data, selection persistence and cache handling. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Adds OMXC25 as a true index (not an ETF proxy) on the existing Indices tab, associated with Nasdaq Copenhagen (XCSE), Denmark, DKK. Provider and plan - Twelve Data /quote, symbol OMXC25. Twelve Data's /indices catalogue lists it as "OMX Copenhagen 25 Index" (DKK) with access level "Pro", so free/Basic keys get HTTP 403. The index is therefore turned off by default: the row is shown greyed out with a note explaining why, and no request is made. Enable it by adding "EnabledIndices": ["OMXC25"] to user-preferences.json (new optional preference, carried through Save-UserPreferences; no Settings UI yet). When enabled - Fetched in its own request with its own 15-minute cache, so a plan restriction or failure never affects the existing ETF batch. - HTTP 403/404 stop further requests for that key for the session (no wasted credits); 429/network errors retry after the TTL and keep showing the last good quote. - Status line: Intraday (may be delayed) / Last close / Stale / Unavailable, judged against the dashboard's own Nasdaq Copenhagen hours and holidays rather than Twelve Data's is_market_open (which files OMXC25 under Stockholm, XSTO). Stale values are greyed out. Twelve Data does not state whether quotes are real-time, so nothing is labelled "live". Quote time is shown in Copenhagen time. Code - Private/IndexQuotes.ps1: index definitions (the eight ETF proxies moved here unchanged), Test-IndexEnabled, Twelve Data quote parsing, per-index cache with back-off, and quote-status classification. - README: OMXC25 section with enabling and troubleshooting steps. - Pester tests: registration, opt-in, parsing, mocked retrieval, network failure, cache/TTL/back-off and quote status. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 9, 2026
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds the OMX Copenhagen 25 index (
OMXC25) to the Indices tab as a true index rather than an ETF proxy, linked to Nasdaq Copenhagen (XCSE), Denmark, DKK. It is turned off by default because it needs a paid Twelve Data plan.Why it is off by default
OMXC25("OMX Copenhagen 25 Index", DKK) with access levelPro:/indices?symbol=OMXC25&show_plan=true."EnabledIndices": ["OMXC25"]inuser-preferences.json. This is a new optional preference, carried throughSave-UserPreferences; there is no Settings UI yet.About the index
When enabled
/quoterequest with its own 15-minute cache, so a plan restriction or failure never affects the existing ETF batch.is_market_open, because Twelve Data files OMXC25 under the Stockholm MIC (XSTO), whose hours and holidays differ (e.g. Stockholm trades on 15 May 2026, a Copenhagen closure). The quote time is shown in Copenhagen time.Code
Private/IndexQuotes.ps1:Test-IndexEnabled;Interaction with other PRs
#10 relabels three ETF proxies in the dashboard's inline list; this PR moves that list to
Private/IndexQuotes.ps1. If both are merged, keep #10's labels in the moved list.Checks
Lintworkflow already fails onmainbefore this change — PSScriptAnalyzer reports 120 Warning-level findings there (e.g. run 36486962685). This PR adds no new findings (compared by rule, file and message againstmain), so a red Lint check here is the pre-existing state.[Unreleased]. The PRs in this series are independent where possible, so whichever merges second will have a trivial conflict in that section — keep both entries.This is one of a series of small PRs (fixes and features kept separate so you can pick and choose): #2 countdown hours · #3 Refresh button · #4 map preferences · #5 Nasdaq Copenhagen · #6 OMXC25 · #7 FX DKK/SEK · #8 København clock · #9 FTSE 100 · #10 ETF labels.
🤖 Generated with Claude Code