Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 4, 2026

Implements StreamHub support for Price Relative Strength (PRS), completing P006 from the streaming indicators plan. PRS compares two independent series (eval vs base), requiring a dual-provider pattern not previously used in the streaming framework.

Implementation

Dual-provider architecture

  • PrsHub subscribes to eval provider, maintains reference to base provider
  • Cache synchronization via on-demand refresh in ToIndicator()
  • Supports optional lookback periods for PRS percent calculation

Key pattern

// Usage requires coordinated updates to both providers
QuoteHub evalHub = new();
QuoteHub baseHub = new();
PrsHub indicator = evalHub.ToPrsHub(baseHub, lookbackPeriods: 14);

// Base must update before eval to maintain cache consistency
baseHub.Add(baseQuote);
evalHub.Add(evalQuote);  // Triggers PrsHub calculation

Testing

  • Comprehensive StreamHub test suite with rollback validation
  • Chaining tests as both observer and provider
  • Performance benchmark added to StyleComparison suite

Files changed

  • src/m-r/Prs/Prs.StreamHub.cs - StreamHub implementation
  • tests/indicators/m-r/Prs/Prs.StreamHub.Tests.cs - Test coverage
  • tools/performance/Perf.StyleComparison.cs - Benchmark integration
  • docs/plans/streaming-indicators.plan.md - Mark P006 complete
Original prompt

On streaming-indicators.plan.md, Implement P006 in streaning indicatore plan. mark it completed when done.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 4, 2026

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

- Add Prs.StreamHub.cs with dual-provider pattern for eval/base comparison
- Add comprehensive StreamHub tests with rollback validation
- Add StreamHub benchmark to performance comparison suite
- Mark P006 complete in streaming-indicators.plan.md
- Handle cache synchronization with refresh pattern in ToIndicator

Co-authored-by: DaveSkender <[email protected]>
Copilot AI changed the title [WIP] Implement P006 in streaming indicators plan feat: Implement PrsHub StreamHub for dual-provider streaming indicators Jan 4, 2026
Copilot AI requested a review from DaveSkender January 4, 2026 09:11
@DaveSkender DaveSkender linked an issue Jan 5, 2026 that may be closed by this pull request
@DaveSkender DaveSkender added the on hold On hold / waiting label Jan 5, 2026
@DaveSkender
Copy link
Owner

On hold, since we moved this to backlog:

@DaveSkender DaveSkender temporarily deployed to stockindicators.dev January 11, 2026 17:39 — with GitHub Actions Inactive
@DaveSkender DaveSkender added this to the v3.1 milestone Jan 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

on hold On hold / waiting

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

PairsHub type for Beta, Corr, Prs, etc.

2 participants