Import a TradingView chart export as a raw series file, for the backfill (0.3.1) - #32
Merged
Merged
Conversation
…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>
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
The backfill path the box's
series-routine.mdnames. 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 SYMconverts one export into a raw file in the connector's shape (<date>-csv-export.json,"source": "csv-export"), and the ordinary--build-tradingviewthen applies every guard, anchors included. Exactly one symbol per call, refused otherwise.timeas 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.Test plan
ruff check src testsclean.🤖 Generated with Claude Code