Open DaveSkender opened 1 year ago
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.
This is likely an adaptation of the
quotes.Aggregate()
utility.Originally posted by @DaveSkender in https://github.com/DaveSkender/Stock.Indicators/discussions/1069#discussioncomment-6422153 discussion with @mihakralj