Skip to content

Import a TradingView chart export as a raw series file, for the backfill (0.3.1) - #32

Merged
mspinola merged 1 commit into
mainfrom
claude/tradingview-csv-import
Sep 18, 2026
Merged

mspinola merged 1 commit into
mainfrom
claude/tradingview-csv-import

Conversation

@mspinola

Copy link
Copy Markdown
Owner

Summary

The backfill path the box's series-routine.md names. A first fill of history is not a 5000-bar pull through the Desktop routine (thousands of bars transcribed through a model, with no stored bars for the overlap guard to catch a slip against). TradingView's own chart export is exact, so:

  • --tradingview-csv PATH --symbols SYM converts one export into a raw file in the connector's shape (<date>-csv-export.json, "source": "csv-export"), and the ordinary --build-tradingview then applies every guard, anchors included. Exactly one symbol per call, refused otherwise.
  • time as unix seconds or ISO, rows in any order. The ISO path converts via Timedelta arithmetic: pandas parsed the fixture at microsecond resolution and an integer cast silently changed unit, which the first test run caught.
  • 0.3.0 → 0.3.1.

Test plan

  • Three new tests: an out-of-order unix export becomes a raw file the build accepts (32.23 on 2026-09-16 lands); ISO timestamps round-trip and a file lacking the columns is refused by name; the CLI refuses zero or two symbols and then builds.
  • Full suite offline: 302 passed, 14 skipped. ruff check src tests clean.

🤖 Generated with Claude Code

…ill (0.3.1)

A first fill of a series' history is not a 5000-bar pull through the Desktop
routine: writing thousands of bars verbatim through a language model is slow,
expensive and, with no stored bars for the overlap guard to catch a slip
against, unchecked. TradingView's own "Export chart data" CSV is exact and
needs no transcription, so `--tradingview-csv PATH --symbols SYM` converts one
export into a raw file in the connector's shape (`<date>-csv-export.json`,
carrying "source": "csv-export"), and the ordinary `--build-tradingview` then
applies every guard it has, the registry anchors included. Exports arrive with
`time` as unix seconds or an ISO timestamp, in either order; both are handled,
and the ISO path converts through Timedelta arithmetic because pandas may
parse at microsecond resolution and an integer cast would silently change unit
(the first test run caught exactly that).

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@mspinola
mspinola merged commit 34e64f4 into main Sep 18, 2026
5 checks passed
@mspinola
mspinola deleted the claude/tradingview-csv-import branch September 18, 2026 01:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant