Skip to content

huangxiancun/renko

This branch is 17 commits behind aticio/renko:main.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

3a80165 · Dec 25, 2021

History

14 Commits
Dec 24, 2021
Dec 24, 2021
Dec 24, 2021
Dec 24, 2021
Dec 25, 2021
Dec 25, 2021
Dec 25, 2021

Repository files navigation

Renko

Renko chart creator.

Publish Python 🐍 distributions 📦 to PyPI and TestPyPI

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

About

Renko chart creator.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%