forked from LastAncientOne/SimpleStockAnalysisPython
-
Notifications
You must be signed in to change notification settings - Fork 0
/
candlestick.html
85 lines (51 loc) · 10.7 KB
/
candlestick.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>AAPL candlestick</title>
<script type="text/javascript" src="https://cdn.bokeh.org/bokeh/release/bokeh-2.2.3.min.js" integrity="sha384-T2yuo9Oe71Cz/I4X9Ac5+gpEa5a8PpJCDlqKYO0CfAuEszu1JrXLl8YugMqYe3sM" crossorigin="anonymous"></script>
<script type="text/javascript">
Bokeh.set_log_level("info");
</script>
</head>
<body>
<div class="bk-root" id="27fb35be-c510-4e8e-93a3-23f91be63695" data-root-id="1752"></div>
<script type="application/json" id="2038">
{"cfcedf05-0410-4413-a922-ffbd6afef039":{"roots":{"references":[{"attributes":{"overlay":{"id":"1776"}},"id":"1773","type":"BoxZoomTool"},{"attributes":{"months":[0,4,8]},"id":"1813","type":"MonthsTicker"},{"attributes":{"months":[0,2,4,6,8,10]},"id":"1812","type":"MonthsTicker"},{"attributes":{"line_alpha":{"value":0.1},"x0":{"field":"x0"},"x1":{"field":"x1"},"y0":{"field":"y0"},"y1":{"field":"y1"}},"id":"1785","type":"Segment"},{"attributes":{"months":[0,6]},"id":"1814","type":"MonthsTicker"},{"attributes":{"mantissas":[1,2,5],"max_interval":500.0,"num_minor_ticks":0},"id":"1804","type":"AdaptiveTicker"},{"attributes":{},"id":"1821","type":"UnionRenderers"},{"attributes":{},"id":"1802","type":"BasicTickFormatter"},{"attributes":{"bottom":{"field":"bottom"},"fill_color":{"value":"#D5E1DD"},"top":{"field":"top"},"width":{"value":43200000},"x":{"field":"x"}},"id":"1789","type":"VBar"},{"attributes":{"data_source":{"id":"1793"},"glyph":{"id":"1794"},"hover_glyph":null,"muted_glyph":null,"nonselection_glyph":{"id":"1795"},"selection_glyph":null,"view":{"id":"1797"}},"id":"1796","type":"GlyphRenderer"},{"attributes":{},"id":"1774","type":"ResetTool"},{"attributes":{"months":[0,1,2,3,4,5,6,7,8,9,10,11]},"id":"1811","type":"MonthsTicker"},{"attributes":{"bottom":{"field":"bottom"},"fill_alpha":{"value":0.1},"fill_color":{"value":"#F2583E"},"line_alpha":{"value":0.1},"top":{"field":"top"},"width":{"value":43200000},"x":{"field":"x"}},"id":"1795","type":"VBar"},{"attributes":{},"id":"1775","type":"SaveTool"},{"attributes":{"num_minor_ticks":5,"tickers":[{"id":"1804"},{"id":"1805"},{"id":"1806"},{"id":"1807"},{"id":"1808"},{"id":"1809"},{"id":"1810"},{"id":"1811"},{"id":"1812"},{"id":"1813"},{"id":"1814"},{"id":"1815"}]},"id":"1764","type":"DatetimeTicker"},{"attributes":{"formatter":{"id":"1800"},"major_label_orientation":0.7853981633974483,"ticker":{"id":"1764"}},"id":"1763","type":"DatetimeAxis"},{"attributes":{"base":60,"mantissas":[1,2,5,10,15,20,30],"max_interval":1800000.0,"min_interval":1000.0,"num_minor_ticks":0},"id":"1805","type":"AdaptiveTicker"},{"attributes":{"days":[1,4,7,10,13,16,19,22,25,28]},"id":"1808","type":"DaysTicker"},{"attributes":{"days":[1,15]},"id":"1810","type":"DaysTicker"},{"attributes":{"source":{"id":"1788"}},"id":"1792","type":"CDSView"},{"attributes":{"bottom":{"field":"bottom"},"fill_alpha":{"value":0.1},"fill_color":{"value":"#D5E1DD"},"line_alpha":{"value":0.1},"top":{"field":"top"},"width":{"value":43200000},"x":{"field":"x"}},"id":"1790","type":"VBar"},{"attributes":{},"id":"1818","type":"Selection"},{"attributes":{},"id":"1755","type":"DataRange1d"},{"attributes":{"axis":{"id":"1767"},"dimension":1,"grid_line_alpha":0.3,"ticker":null},"id":"1770","type":"Grid"},{"attributes":{"below":[{"id":"1763"}],"center":[{"id":"1766"},{"id":"1770"}],"left":[{"id":"1767"}],"plot_width":1000,"renderers":[{"id":"1786"},{"id":"1791"},{"id":"1796"}],"title":{"id":"1753"},"toolbar":{"id":"1777"},"x_range":{"id":"1755"},"x_scale":{"id":"1759"},"y_range":{"id":"1757"},"y_scale":{"id":"1761"}},"id":"1752","subtype":"Figure","type":"Plot"},{"attributes":{"active_drag":"auto","active_inspect":"auto","active_multi":null,"active_scroll":"auto","active_tap":"auto","tools":[{"id":"1771"},{"id":"1772"},{"id":"1773"},{"id":"1774"},{"id":"1775"}]},"id":"1777","type":"Toolbar"},{"attributes":{"source":{"id":"1793"}},"id":"1797","type":"CDSView"},{"attributes":{},"id":"1772","type":"WheelZoomTool"},{"attributes":{"days":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31]},"id":"1807","type":"DaysTicker"},{"attributes":{"data_source":{"id":"1788"},"glyph":{"id":"1789"},"hover_glyph":null,"muted_glyph":null,"nonselection_glyph":{"id":"1790"},"selection_glyph":null,"view":{"id":"1792"}},"id":"1791","type":"GlyphRenderer"},{"attributes":{},"id":"1817","type":"UnionRenderers"},{"attributes":{},"id":"1771","type":"PanTool"},{"attributes":{"days":[1,8,15,22]},"id":"1809","type":"DaysTicker"},{"attributes":{},"id":"1819","type":"UnionRenderers"},{"attributes":{},"id":"1768","type":"BasicTicker"},{"attributes":{"x0":{"field":"x0"},"x1":{"field":"x1"},"y0":{"field":"y0"},"y1":{"field":"y1"}},"id":"1784","type":"Segment"},{"attributes":{"source":{"id":"1783"}},"id":"1787","type":"CDSView"},{"attributes":{"data":{"bottom":{"__ndarray__":"AAAAQH/RUUA=","dtype":"float64","order":"little","shape":[1]},"top":{"__ndarray__":"AAAAwB7NUUA=","dtype":"float64","order":"little","shape":[1]},"x":{"__ndarray__":"AAAADPjzdkI=","dtype":"float64","order":"little","shape":[1]}},"selected":{"id":"1818"},"selection_policy":{"id":"1819"}},"id":"1788","type":"ColumnDataSource"},{"attributes":{"data":{"x0":{"__ndarray__":"AAAAgj7sdkIAAMDnkOx2QgAAgE3j7HZCAABAszXtdkIAAAAZiO12QgAAQEp/7nZCAAAAsNHudkIAAMAVJO92QgAAgHt273ZCAABA4cjvdkIAAIASwPB2QgAAQHgS8XZCAAAA3mTxdkIAAMBDt/F2QgAAgKkJ8nZCAADA2gDzdkIAAIBAU/N2QgAAAAz483ZCAADAcUr0dkIAAACjQfV2QgAAwAiU9XZC","dtype":"float64","order":"little","shape":[21]},"x1":{"__ndarray__":"AAAAgj7sdkIAAMDnkOx2QgAAgE3j7HZCAABAszXtdkIAAAAZiO12QgAAQEp/7nZCAAAAsNHudkIAAMAVJO92QgAAgHt273ZCAABA4cjvdkIAAIASwPB2QgAAQHgS8XZCAAAA3mTxdkIAAMBDt/F2QgAAgKkJ8nZCAADA2gDzdkIAAIBAU/N2QgAAAAz483ZCAADAcUr0dkIAAACjQfV2QgAAwAiU9XZC","dtype":"float64","order":"little","shape":[21]},"y0":{"__ndarray__":"AAAAAADEUEAAAADgejhQQAAAAMD1dFBAAAAAgD2eUEAAAAAAAPBQQAAAAMDM7FBAAAAAwB7hUEAAAACgmfFQQAAAAMD1CFFAAAAAwMw0UUAAAADgo4xRQAAAAOBRnFFAAAAAYGaeUUAAAABA4ZJRQAAAAGBmqlFAAAAAAADEUUAAAACAPc5RQAAAACCuH1JAAAAAIIVfUkAAAABACktSQAAAAEDhWlJA","dtype":"float64","order":"little","shape":[21]},"y1":{"__ndarray__":"AAAAQDN3UEAAAADgowRQQAAAAEDhSlBAAAAAIK5rUEAAAADAzLRQQAAAAGCPjlBAAAAAgMKdUEAAAAAAAMhQQAAAAMAetVBAAAAAQOHuUEAAAAAgrk9RQAAAAMDMbFFAAAAAgOtxUUAAAABAM29RQAAAAMD1aFFAAAAAgOuFUUAAAABguK5RQAAAAEAzy1FAAAAAgOsBUkAAAAAghdNRQAAAAOBRGFJA","dtype":"float64","order":"little","shape":[21]}},"selected":{"id":"1816"},"selection_policy":{"id":"1817"}},"id":"1783","type":"ColumnDataSource"},{"attributes":{"data_source":{"id":"1783"},"glyph":{"id":"1784"},"hover_glyph":null,"muted_glyph":null,"nonselection_glyph":{"id":"1785"},"selection_glyph":null,"view":{"id":"1787"}},"id":"1786","type":"GlyphRenderer"},{"attributes":{},"id":"1757","type":"DataRange1d"},{"attributes":{},"id":"1815","type":"YearsTicker"},{"attributes":{"bottom":{"field":"bottom"},"fill_color":{"value":"#F2583E"},"top":{"field":"top"},"width":{"value":43200000},"x":{"field":"x"}},"id":"1794","type":"VBar"},{"attributes":{"formatter":{"id":"1802"},"ticker":{"id":"1768"}},"id":"1767","type":"LinearAxis"},{"attributes":{"axis":{"id":"1763"},"grid_line_alpha":0.3,"ticker":null},"id":"1766","type":"Grid"},{"attributes":{"data":{"bottom":{"__ndarray__":"AAAAgFc8UEAAAAAgeORPQAAAAOBDFlBAAAAAQK9SUEAAAACAZqNQQAAAAMDEZ1BAAAAAQFCAUEAAAABAWKRQQAAAAIAzr1BAAAAA4ELpUEAAAABgXjNRQAAAAMAFPFFAAAAAAHsxUUAAAADA4jVRQAAAAMDCLFFAAAAAIIJ0UUAAAACgwXhRQAAAAEDEz1FAAAAAYNTqUUAAAADgVwxSQA==","dtype":"float64","order":"little","shape":[20]},"top":{"__ndarray__":"AAAA4FG0UEAAAADA9SRQQAAAAMAeUVBAAAAA4KN8UEAAAAAgrrdQQAAAAAAA4FBAAAAAoJnJUEAAAADA9cxQQAAAAOB6vFBAAAAAIFz3UEAAAAAAAFBRQAAAAMAeeVFAAAAAwMx8UUAAAAAAAHhRQAAAACCuo1FAAAAA4HqIUUAAAABACstRQAAAAIDrMVJAAAAAIFwXUkAAAABA4R5SQA==","dtype":"float64","order":"little","shape":[20]},"x":{"__ndarray__":"AAAAgj7sdkIAAMDnkOx2QgAAgE3j7HZCAABAszXtdkIAAAAZiO12QgAAQEp/7nZCAAAAsNHudkIAAMAVJO92QgAAgHt273ZCAABA4cjvdkIAAIASwPB2QgAAQHgS8XZCAAAA3mTxdkIAAMBDt/F2QgAAgKkJ8nZCAADA2gDzdkIAAIBAU/N2QgAAwHFK9HZCAAAAo0H1dkIAAMAIlPV2Qg==","dtype":"float64","order":"little","shape":[20]}},"selected":{"id":"1820"},"selection_policy":{"id":"1821"}},"id":"1793","type":"ColumnDataSource"},{"attributes":{"bottom_units":"screen","fill_alpha":0.5,"fill_color":"lightgrey","left_units":"screen","level":"overlay","line_alpha":1.0,"line_color":"black","line_dash":[4,4],"line_width":2,"right_units":"screen","top_units":"screen"},"id":"1776","type":"BoxAnnotation"},{"attributes":{},"id":"1816","type":"Selection"},{"attributes":{"text":"AAPL Candlestick"},"id":"1753","type":"Title"},{"attributes":{"base":24,"mantissas":[1,2,4,6,8,12],"max_interval":43200000.0,"min_interval":3600000.0,"num_minor_ticks":0},"id":"1806","type":"AdaptiveTicker"},{"attributes":{},"id":"1820","type":"Selection"},{"attributes":{},"id":"1800","type":"DatetimeTickFormatter"},{"attributes":{},"id":"1761","type":"LinearScale"},{"attributes":{},"id":"1759","type":"LinearScale"}],"root_ids":["1752"]},"title":"Bokeh Application","version":"2.2.3"}}
</script>
<script type="text/javascript">
(function() {
var fn = function() {
Bokeh.safely(function() {
(function(root) {
function embed_document(root) {
var docs_json = document.getElementById('2038').textContent;
var render_items = [{"docid":"cfcedf05-0410-4413-a922-ffbd6afef039","root_ids":["1752"],"roots":{"1752":"27fb35be-c510-4e8e-93a3-23f91be63695"}}];
root.Bokeh.embed.embed_items(docs_json, render_items);
}
if (root.Bokeh !== undefined) {
embed_document(root);
} else {
var attempts = 0;
var timer = setInterval(function(root) {
if (root.Bokeh !== undefined) {
clearInterval(timer);
embed_document(root);
} else {
attempts++;
if (attempts > 100) {
clearInterval(timer);
console.log("Bokeh: ERROR: Unable to run BokehJS code because BokehJS library is missing");
}
}
}, 10, root)
}
})(window);
});
};
if (document.readyState != "loading") fn();
else document.addEventListener("DOMContentLoaded", fn);
})();
</script>
</body>
</html>