Renko
Renko chart creator.
Example Usage
from renko import Renko
...
# Create new renko instance. Give brick size and list of close prices as parameters
rnk = Renko(1000, close)
rnk.create_renko()
print(rnk.bricks)
...
# The output will be like:
[
{'type': 'first', 'open': 10336.87, 'close': 10336.87}
{'type': 'up', 'open': 10336.87, 'close': 11084.87}
{'type': 'up', 'open': 11084.87, 'close': 11832.87}
{'type': 'up', 'open': 11832.87, 'close': 12580.87}
{'type': 'up', 'open': 12580.87, 'close': 13328.87}
{'type': 'up', 'open': 13328.87, 'close': 14076.87}
{'type': 'up', 'open': 14076.87, 'close': 14824.87}
{'type': 'up', 'open': 14824.87, 'close': 15572.87}
{'type': 'up', 'open': 15572.87, 'close': 16320.87, 'low': 14818.3}
{'type': 'up', 'open': 16320.87, 'close': 17068.87}
{'type': 'up', 'open': 17068.87, 'close': 17816.87}
{'type': 'up', 'open': 17816.87, 'close': 18564.87}
{'type': 'up', 'open': 18564.87, 'close': 19312.87, 'low': 17139.52}
{'type': 'up', 'open': 19312.87, 'close': 20060.87, 'low': 18036.53}
{'type': 'up', 'open': 20060.87, 'close': 20808.87}
...
...
...
{'type': 'up', 'open': 48484.87, 'close': 49232.87}
{'type': 'up', 'open': 49232.87, 'close': 49980.87}
{'type': 'up', 'open': 49980.87, 'close': 50728.87}
{'type': 'down', 'open': 49980.87, 'close': 49232.87, 'high': 50820.0}
{'type': 'down', 'open': 49232.87, 'close': 48484.87}
{'type': 'down', 'open': 48484.87, 'close': 47736.87}
{'type': 'down', 'open': 47736.87, 'close': 46988.87}
{'type': 'down', 'open': 46988.87, 'close': 46240.87}
{'type': 'down', 'open': 46240.87, 'close': 45492.87, 'high': 47722.65}
{'type': 'down', 'open': 45492.87, 'close': 44744.87}
{'type': 'down', 'open': 44744.87, 'close': 43996.87}
{'type': 'down', 'open': 43996.87, 'close': 43248.87}
{'type': 'down', 'open': 43248.87, 'close': 42500.87}
{'type': 'down', 'open': 42500.87, 'close': 41752.87}
{'type': 'up', 'open': 42500.87, 'close': 43248.87, 'low': 41679.74}
{'type': 'down', 'open': 42500.87, 'close': 41752.87}
{'type': 'down', 'open': 41752.87, 'close': 41004.87}
{'type': 'down', 'open': 41004.87, 'close': 40256.87}
]
from renko import Renko
...
# If you use it live in your strategies, pass the current price to check_new_price() function.
# If new price change is big enough to create a new birck or bricks,
# the bricks list will be updated accordingly.
rnk = Renko(1000, close)
rnk.create_renko()
print(rnk.bricks)
...
rnk.check_new_price(100000)
print("Bricks after new price added-------------")
print(rnk.bricks)
from renko import Renko
...
# You can plot the bricks as follows.
rnk = Renko(1000, close)
rnk.create_renko()
rnk.draw_chart()
...
Installation
Run the following to install:
pip install renko
Metadata
Release files for renko 0.0.16
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| renko-0.0.16.tar.gz | 3.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| renko-0.0.16-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 8.2 kB
Release files / renko-0.0.16.tar.gz
| Download URL | renko-0.0.16.tar.gz |
|---|---|
| Size | 3.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
03c46eb8b0ef2856abe35e26d4a1320e19fab3f91b0e5e6ea73294732cb565af
|
|
BLAKE2b-256 checksum How to use checksums |
73e4a5bf085d7ad66a5f4ad4942de8d2bf206947363e0e3f97f0e05740e8f531
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.7.15
|
Release files / renko-0.0.16-py3-none-any.whl
| Download URL | renko-0.0.16-py3-none-any.whl |
|---|---|
| Size | 4.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e0b6c33c5cd56ec03cfb0522dcaf741d7d6a33df21a492e6b7e552dbe5055af3
|
|
BLAKE2b-256 checksum How to use checksums |
7623810dd73bdc656bd3bd64a5b238485bd08a78452e86518b0a0385689a2d0a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.7.15
|