Renko calculation and chart
Project description
pyrenko
This is a class for calculating and visualizing a renko chart.
Author
Credit to the author for source code of pyrenko.
The only contribution from dennislwm is made a package and upload it to PyPi.
Installation
$ pip install pyrenko
Example
>>> import pyrenko
Getting Data
>>> import yfinance
>>> data = yfinance.download('SPY', start="2019-01-01", end="2019-12-31")
Note: Variable data is of type DataFrame that consists of columns ['Open', 'High', 'Low', 'Close'].
Get optimal brick size based
>>> optimal_brick = pyrenko.renko().set_brick_size(auto = True, HLC_history = data[["High", "Low", "Close"]])
Build Renko
>>> objRenko = pyrenko.renko()
>>> print('Set brick size: ', objRenko.set_brick_size(auto = False, brick_size = optimal_brick))
>>> objRenko.build_history(prices = data.Close)
Renko data
>>> print('Renko length:' , len(objRenko.get_renko_prices()))
>>> print('Renko bar directions: ', objRenko.get_renko_directions())
>>> print('Renko bar evaluation: ', objRenko.evaluate())
Plot chart
>>> objRenko.plot_renko()
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pyrenko-0.1.tar.gz
(3.4 kB
view details)
File details
Details for the file pyrenko-0.1.tar.gz.
File metadata
- Download URL: pyrenko-0.1.tar.gz
- Upload date:
- Size: 3.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.3.1 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.7.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
299a3bf6663342e2f75efe4a370ff5c8fdd8bb15a6fd7b5de8bcbfd8eefedc5d
|
|
| MD5 |
7fdaf4e4bca4b34f80460470afcf36b5
|
|
| BLAKE2b-256 |
2e38b08450630b6cbe1d976b2564febe7008e650c8e4f67b97923833df00a6df
|