Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

quote-stream auto-aggregator #1093

Open
DaveSkender opened this issue Oct 12, 2023 · 1 comment
Open

quote-stream auto-aggregator #1093

DaveSkender opened this issue Oct 12, 2023 · 1 comment
Labels
enhancement New feature or request
Milestone

Comments

@DaveSkender
Copy link
Owner

DaveSkender commented Oct 12, 2023

That overload would be a good prototype to add to EMA if you’re interested. Sounds like a useful thing to open up different feed choices. I think a simple pre-processor Add(quote, outBarSize) to aggregate before calling Add(quote) would do it, keep some separation of concerns. This might be similar to or combined with #670

This is likely an adaptation of the quotes.Aggregate() utility.

Originally posted by @DaveSkender in #1069 (reply in thread) discussion with @mihakralj

@DaveSkender DaveSkender added this to the v3 milestone Oct 12, 2023
@DaveSkender DaveSkender added the enhancement New feature or request label Oct 12, 2023
@DaveSkender DaveSkender moved this from Maybe to Do Next in Stock Indicators for .NET Oct 12, 2023
@DaveSkender
Copy link
Owner Author

DaveSkender commented Nov 9, 2023

One thing I'm noticing with Alpaca API for BTC quotes for "minutely" data is that it will regularly skip minutes. I can imagine many scenarios for why this would happen, like having no actual trade volume. I think this aggregator might need to fill in the gaps by carrying over the prior price in some cases. This could get messy, because some markets don't operate 24/7 and have intentional gaps with no new prices.

# note the missing 02:58 minute price

Date                     Price      SMA(3)      EMA(5)  EMA(7,HL2)
----------------------------------------------------------------------
2023-11-09 02:53    $36,299.93
2023-11-09 02:54    $36,348.60
2023-11-09 02:55    $36,341.55    36,330.0
2023-11-09 02:56    $36,356.48    36,348.9
2023-11-09 02:57    $36,348.91    36,349.0    36,339.1
2023-11-09 02:59    $36,375.22    36,360.2    36,351.1
2023-11-09 03:00    $36,352.32    36,358.8    36,351.5    36,345.8
2023-11-09 03:01    $36,341.65    36,356.4    36,348.2    36,348.3

You can observe this yourself from our ObserveStream sample project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Development

No branches or pull requests

1 participant