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

Make Stock effect compare against previous day's close #670

Merged
merged 1 commit into from
Nov 29, 2024

Conversation

rbergen
Copy link
Collaborator

@rbergen rbergen commented Nov 29, 2024

Description

This closes #662 by making the effect compare against the previous day's close instead of today's open. It does this both in the numeric change shown, as in the graph underneath it.

There is still one "peculiarity" that people may notice, which is that the data points in the graph include after-hour trading, and we don't show this in the coloring of the graph (Google and other sources tend to show after-hour trading in a different color).

This means that the last data point for a calendar day may be positive (green) while the (correct) day change is negative, or vice versa. If we want to change this then we need the stockserver to indicate in its response to the effect what data points are outside of regular trading hours.

Also, the default host for the stockserver changed from davepl.com to davepl.dyndns.org, to better handle IP address changes for Dave's Internet connection.

Contributing requirements

  • I read the contribution guidelines in CONTRIBUTING.md.
  • I understand the BlinkenPerBit metric, and maximized it in this PR.
  • I selected main as the target branch.
  • All code herein is subjected to the license terms in COPYING.txt.

@rbergen rbergen requested a review from davepl November 29, 2024 19:34
Copy link
Contributor

@davepl davepl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! Simple fix, doesn't mean it was simple to figure out :-)

@davepl davepl merged commit 08d1895 into PlummersSoftwareLLC:main Nov 29, 2024
43 checks passed
@rbergen
Copy link
Collaborator Author

rbergen commented Nov 29, 2024

Thanks! The hard work was actually done in the back-end (stockserver), where it belongs, a few weeks ago. :)

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.

Tweak StockTicker effect
2 participants