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

Incorrectly calculated lastPrice in candlestick charts on weekly and monthly base #175

Open
magellan86 opened this issue Dec 17, 2021 · 0 comments

Comments

@magellan86
Copy link

Candlestick charts on weekly and monthly base seem to show the wrong final price.
Quick analysis found that the price is calculated as average:
org.yccheok.jstock.charting.Utils.getWeeklyChartData and getMonthlyChartData generate the lastPrice as average:
lastPrice / count, // Average last price.

AFAIK this makes no sense. It should be the last price before the change of week / month.

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