Skip to content

StephanAkkerman/bitcoin-rainbow-chart

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bitcoin Rainbow Price Chart 🌈

This is a simple Python script that generates a price chart for Bitcoin using the rainbow chart method. The rainbow chart is a logarithmic chart that shows the price of Bitcoin in different colors based on the logarithmic price scale. This can be used as an indicator to determine when to buy or sell Bitcoin. The chart is generated using the matplotlib library in Python.

Supported versions License Code style: black


Introduction

I have seen this indicator many times on the internet and I wanted to create a simple Python script that generates this chart. I used the version found on coinglass as a reference. The data is fetched using Nasdaq's Data Link as they had the oldest data available. I used Binance's API to get the most recent data, as Nasdaq's data only goes up to the beginning of 2024.

Installation ⚙️

The required packages to run this code can be found in the requirements.txt file. To run this file, execute the following code block after cloning the repository:

pip install -r requirements.txt

Usage ⌨️

To generate the chart, simply run the script using the following command:

python src/main.py

Example 📊

The following chart is an example of the output generated by the script. The vertical lines represent the halving events of Bitcoin. Bitcoin Rainbow Chart

References 📚

The following image was used as a reference for the color scale. Bitcoin Rainbow Chart Reference

Other references

The following websites also provide information about the rainbow chart:

TradingView Indicators 📈

The following TradingView indicators do a similar thing:

Acknowledgements 🙏

I used the code from coinmonks' Medium post as an inspiration for this.