ConradSelig / cliStocksTracker

A command line utility for tracking a stock market portfolio. Primarily featuring high resolution braille graphs.
Apache License 2.0
56 stars 14 forks source link

Running cliStocksTracker in the first minute of market open throws error. #24

Open ConradSelig opened 3 years ago

ConradSelig commented 3 years ago

It's a ValueError: _min is larger or equal than max_ error. This is because there is only one data point for the program to use (market open).

Easiest fix would just to create a second datapoint in the data[] array with the same value as the first data point. While this is not a perfect representation of real market data - it will only show this for a maximum of 1 minute.

patrick-hovsepian commented 3 years ago

rather than fudge the actual market data perhaps we can just print the current price and be done with it?

ConradSelig commented 3 years ago

Works great for the table - less so for the graphs. The plotille graphs we are using a strictly line graphs, meaning they need at least two points to work. Unless we want to convert to using a scatter plot for that first minute, but that suddenly seems like an awful lot of work for a single minute a day. I'll leave it up to the ticket assignee if they want to put that much effort into it.