fix(data): allow full strategy export pulls - #516
mattamundson wants to merge 3 commits into
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7a98e7e963
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const MAX_OHLCV_BARS = 10000; | ||
| const MAX_TRADES = 1000; |
There was a problem hiding this comment.
Synchronize the exposed limits with the new caps
When users access these functions through the supported MCP, CLI, or strategy-report workflow, the public guidance still advertises the old limits: src/tools/data.js:7 and src/cli/commands/data.js:12 say OHLCV is capped at 500, while skills/strategy-report/SKILL.md:14 and CLAUDE.md:120 say trades are capped at 20. As a result, clients and agents following those contracts will not request the newly supported ranges, so the intended full-export behavior remains undiscoverable and strategy-report runs can continue returning only 20 orders; update these surfaces alongside the constants.
Useful? React with 👍 / 👎.
|
|
||
| const MAX_OHLCV_BARS = 500; | ||
| const MAX_TRADES = 20; | ||
| const MAX_OHLCV_BARS = 10000; |
There was a problem hiding this comment.
Apply the larger OHLCV cap to batch retrievals
When OHLCV is requested through the supported batch_run path with ohlcv_count above 500, src/core/batch.js:48 still computes Math.min(ohlcv_count || 100, 500) and slices the export to that value. Because this path implements extraction independently rather than calling getOhlcv, the new 10,000-bar cap has no effect and batch parity/export runs remain silently truncated to 500 bars; share the new cap with this path or update its limit as well.
Useful? React with 👍 / 👎.
|
Pushed follow-up hardening commit Local verification on Windows after the update:
Follow-up contents:
Still intentionally scoped to TradingView Desktop/CDP research workflow; no execution/trading integration implied. |
Summary
Why
Full daily Strategy Tester parity runs need more history and filled orders than the previous hard caps allowed. A verified SPY daily Strategy Lab run required 8,460 daily bars and 247 filled orders; the prior caps silently truncated both surfaces.
Verification
node --check src/core/data.jsnpm run test:unitnpm run lintnode --test tests/chart_history.test.js tests/cli.test.js