Repository navigation
feat(trading-strategies): complete the running interval from minutes in BatchedIndicator.warmUp - #1419
Open
bennycode wants to merge 3 commits into
Open
feat(trading-strategies): complete the running interval from minutes in BatchedIndicator.warmUp#1419bennycode wants to merge 3 commits into
bennycode wants to merge 3 commits into
Conversation
…in BatchedIndicator.warmUp
…tch' into feat/batched-indicator-backfill
…tch' into feat/batched-indicator-backfill
This branch has not been deployed
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.
Builds on #1418, please merge that first.
When live candles start in the middle of an interval, say at 10:20 for hourly bars, the batcher only sees the minutes from 10:20 on. The first bar it completes is missing 10:00 to 10:19, so its open, high, low and volume are off.
warmUp()now takes the latest 1-minute candles as an optional second argument. Minutes after the last warm-up bar go through the batcher, so the running interval is complete when live candles take over. An interval that finished between the last warm-up bar and now goes to the indicator. Minutes the warm-up bars already cover are skipped, so nothing is counted twice.The Getting Started example uses the new argument.