chart/tests
Chris Amow ab372832db Snap by x for the bar and y for the extreme, and stop the crosshair magnetting
Sweeping the cursor along the bottom of the chart rarely landed on a bar's low,
and often nowhere near the bar at all. The cause was a nearest-in-2D search I
added an hour earlier to make bars easier to hit when zoomed out: whichever bar
nearby had the lowest low won on total distance, so the dot skipped off the bar
under the cursor instead of tracing each low in turn. Reverted.

The rule is now written down rather than adjusted per complaint — x picks the
bar, y picks which of its extremes — and an e2e test asserts it by sweeping a
zoomed-out 1h chart and requiring every position to land on the low of the bar
beneath it. 115 of 115.

The crosshair is the other half of why this felt broken. Lightweight Charts
defaults to Magnet, which snaps it to the bar's close, so hovering beside a low
displayed a price several ticks from the one an anchor would use. Arming a tool
already switched to Normal, but the chart is read before a tool is armed, which
is when the misleading reading was being taken. Normal everywhere now.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-10 21:35:52 -05:00
..
e2e Snap by x for the bar and y for the extreme, and stop the crosshair magnetting 2026-08-10 21:35:52 -05:00
fixtures Add implementation plan for /ES multi-timeframe confluence chart 2026-08-09 20:31:40 -05:00
test_aggregator.py Implement M2 session-aware aggregation 2026-08-09 20:41:36 -05:00
test_alerts.py Stop re-alerting when price crosses a level 2026-08-10 01:51:54 -05:00
test_asset_versioning.py Version static assets so a fixed bug stops reproducing in an open tab 2026-08-10 04:29:56 -05:00
test_auth.py Guard that the OAuth callback stays reachable under CHART_AUTH_TOKEN 2026-08-10 04:50:12 -05:00
test_bar_space.py Price trendlines across bars, add one-shot alerts, collapse layers, drop 1h MAs 2026-08-10 04:15:05 -05:00
test_confluence.py Fix trendline deletion while typing, audio leak, prefs drift, cluster payload 2026-08-10 00:17:40 -05:00
test_horizontals.py Add prior-day levels and session VWAP; fix alert repetition they exposed 2026-08-10 00:36:21 -05:00
test_manual_lines.py Fix trendline anchors jumping away from where they were drawn 2026-08-10 15:18:40 -05:00
test_moving_averages.py Implement M3 projected daily moving averages 2026-08-09 20:44:11 -05:00
test_price_alerts.py Add a price alert input 2026-08-10 02:09:14 -05:00
test_replay.py Implement M0 Yahoo market data and replay 2026-08-09 20:36:13 -05:00
test_runtime_alerts.py Update higher timeframes from ticks, and count volume-only trades 2026-08-10 12:07:52 -05:00
test_schwab_callback.py Add the OAuth callback endpoint at /api/qt 2026-08-10 04:45:31 -05:00
test_schwab_source.py Stop a zero-price tick and a late exchange bar corrupting the store 2026-08-10 17:10:24 -05:00
test_session.py Remove the 4h timeframe 2026-08-10 00:43:47 -05:00
test_store.py Stop a zero-price tick and a late exchange bar corrupting the store 2026-08-10 17:10:24 -05:00
test_vwap.py Add prior-day levels and session VWAP; fix alert repetition they exposed 2026-08-10 00:36:21 -05:00
test_yahoo.py Implement M0 Yahoo market data and replay 2026-08-09 20:36:13 -05:00