Renko chart creator.
Project description
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': 53041.32, 'close': 53041.32},
{'type': 'down', 'open': 53041.32, 'close': 52041.32},
{'type': 'down', 'open': 52041.32, 'close': 51041.32},
{'type': 'down', 'open': 51041.32, 'close': 50041.32},
{'type': 'down', 'open': 50041.32, 'close': 49041.32},
{'type': 'down', 'open': 49041.32, 'close': 48041.32},
{'type': 'down', 'open': 48041.32, 'close': 47041.32},
{'type': 'up', 'open': 48041.32, 'close': 49041.32},
{'type': 'up', 'open': 49041.32, 'close': 50041.32},
{'type': 'up', 'open': 50041.32, 'close': 51041.32},
{'type': 'down', 'open': 50041.32, 'close': 49041.32},
{'type': 'down', 'open': 49041.32, 'close': 48041.32},
{'type': 'up', 'open': 49041.32, 'close': 50041.32},
{'type': 'down', 'open': 49041.32, 'close': 48041.32},
{'type': 'down', 'open': 48041.32, 'close': 47041.32},
{'type': 'up', 'open': 48041.32, 'close': 49041.32},
{'type': 'down', 'open': 48041.32, 'close': 47041.32},
{'type': 'down', 'open': 47041.32, 'close': 46041.32},
{'type': 'up', 'open': 47041.32, 'close': 48041.32},
{'type': 'up', 'open': 48041.32, 'close': 49041.32},
{'type': 'up', 'open': 49041.32, 'close': 50041.32},
{'type': 'up', 'open': 50041.32, 'close': 51041.32}
]
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)
Installation
Run the following to install:
pip install 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
renko-0.0.7.tar.gz
(2.5 kB
view hashes)
Built Distribution
renko-0.0.7-py3-none-any.whl
(3.5 kB
view hashes)