HTMLcopy
1
<div id="container"></div>
CSScopy
6
1
html, body, #container {
2
width: 100%;
3
height: 100%;
4
margin: 0;
5
padding: 0;
6
}
JavaScriptcopy
x
1
anychart.onDocumentReady(function () {
2
var table = anychart.data.table();
3
4
// The data used in this sample can be obtained from the CDN
5
// https://cdn.anychart.com/csv-data/dji-daily-short.js
6
table.addData(get_dji_daily_short_data());
7
8
var mapping = table.mapAs(
9
{open: 1, high: 2, low: 3, close: 4, 'volume': 5}
10
);
11
12
var chart = anychart.stock();
13
14
var plot = chart.plot();
15
plot.ohlc(mapping);
16
17
var scroller = chart.scroller();
18
scroller.height('20%');
19
20
// Creates Coppock Curve indicator.
21
scroller.coppockCurve(mapping, 12, 13, 16, 'area');
22
23
chart.title('Create Coppock Curve indicator');
24
chart.container('container');
25
chart.draw();
26
});