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

SecuritiesChart: FIFO vs MA price drawing is fully duplicated #4507

Open
pfalcon opened this issue Feb 2, 2025 · 0 comments
Open

SecuritiesChart: FIFO vs MA price drawing is fully duplicated #4507

pfalcon opened this issue Feb 2, 2025 · 0 comments

Comments

@pfalcon
Copy link
Contributor

pfalcon commented Feb 2, 2025

  • createFIFOPurchaseLineSeries() vs createMovingAveragePurchaseLineSeries()
  • addFIFOPurchasePrice() vs addMovingAveragePurchasePrice()

- are duplicated functions, differing only in dependent methods they call / values they use. Duplication means that a bugfix would be applied to only one of copy, that they diverge over time, etc. Instead, they should be refactored to be parameterized via arguments or use switch to capture differences between methods.

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

No branches or pull requests

1 participant