Draw candlesticks charts right into your terminal, using Python!
shutil.get_terminal_size()
instead of os.get_terminal_size()
to be able to run tests without hitting OSError: [Errno 25] Inappropriate ioctl for device
PEP 484 prohibits implicit Optional
Chart(..., renderer_cls=MyClass)
keyword argument (see examples/custom-renderer-class.py
for inspiration)mypy
color()
, it will return the text unchangedPRICE │―
→ PRICE ┤
, and on the right-side: │― PRICE
→ ├ PRICE
)constants.PRECISION
, and constants.PRECISION_SMALL
to control the number of decimals to keep when formatting numbers with fnum()
(defaults to 2
, and 4
, respectively)constants.MIN_DIFF_THRESHOLD
, and constants.MAX_DIFF_THRESHOLD
to control candle top, and bottom, thickness fnum()
(defaults to 0.25
, and 0.75
, respectively)1.0
number within fnum()
isort
Candle.__eq__()
to allow comparing candlesconstants.Y_AXIS_SPACING
to give control on Y-axis spacing between graduations (defaults to 4, reduce to display more graduations, and set a higher number to display less graduations)Chart.update_candles()
behavior: it will update current candles by default, and now accepts a reset=True
optional argument to actually erase all previous candles first (closes #3)