Skip to content

Fix calculations.#293

Merged
cinar merged 1 commit into
masterfrom
issue-292
Feb 16, 2026
Merged

Fix calculations.#293
cinar merged 1 commit into
masterfrom
issue-292

Conversation

@cinar
Copy link
Copy Markdown
Owner

@cinar cinar commented Feb 16, 2026

Describe Request

Bug: APO calculation has incorrect EMA alignment

Fixed #292

Change Type

Bug fix.

Summary by CodeRabbit

  • Bug Fixes
    • Improved synchronization of trend calculation timing to enhance consistency and accuracy in analysis results.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Feb 16, 2026

No actionable comments were generated in the recent review. πŸŽ‰


πŸ“ Walkthrough

Walkthrough

A single line was added to trend/apo.go to align the Fast EMA with the Slow EMA by skipping the first (slowPeriod - fastPeriod) values before subtraction, ensuring both EMAs reference the same time points in the APO calculation.

Changes

Cohort / File(s) Summary
EMA Alignment Fix
trend/apo.go
Added Skip operation to align Fast EMA with Slow EMA before subtraction, matching the pattern used in momentum/ppo.go and trend/macd.go.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐰 A hop, a skip, two EMAs aligned,
Fast and slow in rhythm combined,
APO dances with grace so true,
One line added makes all things new! ✨

πŸš₯ Pre-merge checks | βœ… 5 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title is vague and generic, using the non-descriptive term 'calculations' without explaining what specific calculation is being fixed. Revise the title to be more specific, such as 'Fix APO EMA alignment' or 'Align Fast and Slow EMA in APO calculation' to clearly describe the actual change.
βœ… Passed checks (5 passed)
Check name Status Explanation
Description check βœ… Passed The description includes all required sections from the template (Describe Request, Fixed issue, Change Type) and provides relevant context about the bug fix.
Linked Issues check βœ… Passed The code change aligns with issue #292 requirements by adding a Skip operation to align Fast EMA with Slow EMA before APO subtraction, matching the pattern in similar indicators.
Out of Scope Changes check βœ… Passed The single change is directly related to fixing the EMA alignment issue in APO calculation as specified in issue #292, with no out-of-scope modifications.
Docstring Coverage βœ… Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Merge Conflict Detection βœ… Passed βœ… No merge conflicts detected when merging into master

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • πŸ“ Generate docstrings
πŸ§ͺ Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch issue-292

Tip

Issue Planner is now in beta. Read the docs and try it out! Share your feedback on Discord.


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.

@codecov-commenter
Copy link
Copy Markdown

Codecov Report

βœ… All modified and coverable lines are covered by tests.
βœ… Project coverage is 90.08%. Comparing base (5c7cd39) to head (fbb7703).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #293      +/-   ##
==========================================
- Coverage   90.53%   90.08%   -0.46%     
==========================================
  Files         192      192              
  Lines        6891     5184    -1707     
==========================================
- Hits         6239     4670    -1569     
+ Misses        588      450     -138     
  Partials       64       64              

β˜” View full report in Codecov by Sentry.
πŸ“’ Have feedback on the report? Share it here.

πŸš€ New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@cinar cinar merged commit 42dae78 into master Feb 16, 2026
6 checks passed
@cinar cinar deleted the issue-292 branch February 16, 2026 01:30
@github-actions github-actions Bot locked and limited conversation to collaborators Feb 16, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: APO (Absolute Price Oscillator) calculation has incorrect EMA alignment

2 participants