Add continuous historical-to-realtime strategy streaming#85
Draft
luisleo526 wants to merge 2 commits into
Draft
Conversation
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
request.security()state, and partial timeframe aggregation across the handoffpf_streamingAPI grouptutorial/run_stream.pyexample and keep it in the normal CTest laneWhy
TradingView strategies load confirmed historical bars and then continue on realtime data without replacing the strategy instance. PineForge previously only exposed one-shot backtests, so switching data sources could not preserve the complete broker and script state. This change introduces an explicit streaming lifecycle that keeps the warmed instance alive.
It also establishes the realtime execution foundation needed for later
alert(), order-fill alert, and JSON webhook work. Alert delivery itself is intentionally not part of this PR.Validation
ctest --test-dir build --output-on-failure: 85/85 passed, includingtest_tutorial_stream./scripts/run_corpus.sh: 252/252 executed; 239 excellent, 12 strong, 1 existing anomalybash docs/build.sh: cdocs generated without warnings, includingstreaming.htmland thepf_streaminggrouppython3 tutorial/run_stream.py: 672/672 bar continuity, 49 cumulative trades, exact tutorial P&Lgit diff --check: passedThe long replay used three session starts (2025-03-29, 2025-03-30, and 2025-03-31), each ending exclusively at 2025-05-01. Each strategy/session received one contiguous
strategy_stream_push_ticks(pointer, count)call.