I would like to create a candlestick chart on Matplotlib. I found many examples on the Internet, but so far they all use links to yahoo finances or other data, without explaining how to get the same result when you have a list of tuples containing a date, open, close, high and low prices. Often, indeed, it happens that you already have historical values or estimated values or more in general, you simply do not want to use numbers from a supplier such as Yahoo Finance. What I would like to know is the simplest code to do something like creating a candlestick chart with its own list of values. Suppose I have a list of tuples with all the data I need for two days:
Prices = [('01/01/2010', 1.123 (open), 1.212 (close), 1.463 (high), 1.056(low)),
('02/01/2010', 1.121 (open), 1.216 (close), 1.498 (high), 1.002(low))]
What must I code exactly to get a candlestick chart (this means a chart in which each item in the Prices list creates a candlestick) with these two data points? I can, of course, manipulate the data (an example of a date string that needs to be converted to a floating point day, etc.), but I cannot get simple commands to create a chart. Can anybody help?
source
share