candlestick-chart

Remove weekend gaps in gnuplot for candlestick chart

左心房为你撑大大i 提交于 2019-12-01 06:09:38
问题 I am trying to plot some financial candlestick charts with gnuplot. The problem is that there is no data during the weekends, and I don't want these gaps to be showed. Picture and code included below. set datafile separator "," set xdata time set timefmt"%Y-%m-%d" set xrange ["2015-10-22":"2016-02-06"] set yrange [*:*] set format x plot 'head.dat' using 1:2:4:3:5 notitle with candlesticks 回答1: As you have one entry per working day, instead of using the dates as abscissae you can use the line

Candlestick multiple Y values

邮差的信 提交于 2019-11-30 09:03:51
I am on a mission to make a candlestick graph using MSChart in a windows form. I already succeeded to make a 3D bar chart with no problems. But after a long search on the internet, Microsoft's source code (WinSamples) and a lot of headscratching I can't find the right way to create a candlestick graph. What could help me is a clear example of adding a serie to the chart with multiple Y-values or a correction of my code (when i run, debug nothing shows up exept for the legend label). A bonus would be that the example is based on OleDB (my values are in an Access database). So my question: If

Overlapping Dates in Candlestick Plot from a Pandas DataFrame

ぃ、小莉子 提交于 2019-11-30 05:09:26
I have a pandas dataframe output as follows Open High Low Close 2016-06-01 69.60 70.20 69.44 69.76 2016-06-02 70.00 70.15 69.45 69.54 2016-06-03 69.51 70.48 68.62 68.91 2016-06-04 69.51 70.48 68.62 68.91 2016-06-05 69.51 70.48 68.62 68.91 2016-06-06 70.49 71.44 69.84 70.11 I've used the following code to make the candlestick plot: import pandas as pd import numpy as np import matplotlib.pyplot as plt import matplotlib.ticker as mticker from matplotlib.finance import candlestick_ohlc import matplotlib.dates as mdates import datetime as dt #Reset the index to remove Date column from index df

Candlestick multiple Y values

旧街凉风 提交于 2019-11-29 12:53:05
问题 I am on a mission to make a candlestick graph using MSChart in a windows form. I already succeeded to make a 3D bar chart with no problems. But after a long search on the internet, Microsoft's source code (WinSamples) and a lot of headscratching I can't find the right way to create a candlestick graph. What could help me is a clear example of adding a serie to the chart with multiple Y-values or a correction of my code (when i run, debug nothing shows up exept for the legend label). A bonus

Overlapping Dates in Candlestick Plot from a Pandas DataFrame

一世执手 提交于 2019-11-29 02:57:30
问题 I have a pandas dataframe output as follows Open High Low Close 2016-06-01 69.60 70.20 69.44 69.76 2016-06-02 70.00 70.15 69.45 69.54 2016-06-03 69.51 70.48 68.62 68.91 2016-06-04 69.51 70.48 68.62 68.91 2016-06-05 69.51 70.48 68.62 68.91 2016-06-06 70.49 71.44 69.84 70.11 I've used the following code to make the candlestick plot: import pandas as pd import numpy as np import matplotlib.pyplot as plt import matplotlib.ticker as mticker from matplotlib.finance import candlestick_ohlc import

Annotation Google Chart API

北慕城南 提交于 2019-11-28 02:20:15
i'm trying to use Google Chart API for building an Waterfall chart. I noticed that Candlestick/Waterfall charts are not supporting the annotations. See this jsfiddle sample google.charts.load('current', {'packages':['corechart']}); google.charts.setOnLoadCallback(drawChart); function drawChart() { var data = new google.visualization.DataTable(); data.addColumn('string', 'Category'); data.addColumn('number', 'MinimumLevel'); data.addColumn('number', 'MinimumLevel1'); data.addColumn('number', 'MaximumLevel'); data.addColumn('number', 'MaximumLevel1'); data.addColumn({type: 'number', role:

matplotlib.finance.candlestick_ohlc plot intraday 1min bar data with time breaks and proper xticklabels at every hour

亡梦爱人 提交于 2019-11-26 23:32:22
问题 The problem is: I want to plot the intraday 1 minute OHLC bars of one stock. The daily trading hour is composed of several segments of trading periods. Which is listed below: Trade date: 2017/09/14 Included trading hour: 2017/09/13 21:00 - 23:00, 2017/09/14 9:00 - 10:15, 10:30 - 11:30, 13:30 - 15:00. As you can see, if I just use candlestick_ohlc directly, there will be gaps. Now if I get 1minute data as a dataframe. How can I plot a candlestick graph, with no gaps between any bars(e.g, no

JFreechart candlestick chart weird behaviour on drag

ε祈祈猫儿з 提交于 2019-11-26 15:30:32
This is a follow up question from this question . What happens is the following: When I launch the graph and I drag the graph around, something weird happens: at a certain interval, it seems every 7 periods, the candlesticks get smaller and smaller untill they are only a stripe. Then when I drag further, they become thicker again until they are normal size again. This seems to happen for every 7 periods. An example of this phenomenon is displayed on to the following 3 pictures: The following code will show exactly what I mean. Just compile and run it. Then press and hold CTRL and click and

How do I plot only weekdays using Python's matplotlib candlestick?

☆樱花仙子☆ 提交于 2019-11-26 14:25:04
问题 I'm not managing to plot matplotlib.finance.candlestick without the weekends (blank spaces between every 5 candlesticks). The example from Matplotlib's website doesn't exclude weekends either and the way to exclude weekends on other plots doesn't seem to apply to CandleSticks. Has anybody come across this before? ps. as requested, here is the example: #!/usr/bin/env python from pylab import * from matplotlib.dates import DateFormatter, WeekdayLocator, HourLocator, \ DayLocator, MONDAY from

Since matplotlib.finance has been deprecated, how can I use the new mpl_finance module?

…衆ロ難τιáo~ 提交于 2019-11-26 08:13:01
问题 I am trying to import matplotlib.finance module in python so that I can make a Candlestick OCHL graph. My matplotlib.pyplot version is 2.00. I\'ve tried to import it using the following commands: import matplotlib.finance from matplotlib.finance import candlestick_ohlc I get this error: warnings.warn(message, mplDeprecation, stacklevel=1) MatplotlibDeprecationWarning: The finance module has been deprecated in mpl 2.0 and will be removed in mpl 2.2. Please use the module mpl_finance instead.