Skip to content

Use symbol precision for chart price labels - #418

Draft
ChristopherDownie wants to merge 1 commit into
LuxAlgo:devfrom
ChristopherDownie:fix/chart-price-precision
Draft

ChristopherDownie wants to merge 1 commit into
LuxAlgo:devfrom
ChristopherDownie:fix/chart-price-precision

Conversation

@ChristopherDownie

Copy link
Copy Markdown
Contributor

Background

On EURUSD, the candle readout and Fibonacci price labels rounded 1.10228 to 1.10, making different prices look the same.

Summary

Use the instrument’s tick size for both labels. Update the precision when metadata arrives or refreshes, and fall back to the existing formatting if the tick size is unavailable.

End-to-end verification

In the local Chrome playground, the same EURUSD candle and Fib level displayed 1.10 before the patch and 1.10228 after it. Switching to GBPUSD and USDJPY used each pair’s precision once its metadata arrived.

Checklist

  • This PR does one thing (one fix, one feature, one refactor, or one docs change)
  • npm run typecheck, npm run lint, npm test, and npm run build all pass
  • Tests have been added / updated (for bug fixes / features)
  • Documentation in docs/ has been added / updated (for public interface or feature changes)
  • CHANGELOG.md has an entry under [Unreleased] (for user-visible changes)
  • I have signed the CLA (the bot asks in this PR)
  • I have reviewed this pull request myself (self-review)

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant