JavaScript
$(function () {
// Notice that the dataset has missing data
$.getJSON('https://www.highcharts.com/samples/data/jsonp.php?filename=goog-c.json&callback=?', function (data) {
// transform data to how our functions are used to seeing it:
var priceData = []
for(var i=0; i < data.length; i++) {
priceData.push({timeStamp: data[i][0], close: data[i][1],});
}
var ichimokuData = Ichimoku_Cloud(priceData,9,26,52,26);
$('#container').highcharts('StockChart', {
rangeSelector : {
selected : 1
},
title : {
text : 'Ichimoku Cloud'
},
series: [{
type: 'areasplinerange',
name: 'Temperatures',
data: [
[1246233600000,209.29,204.04],
[1246320000000,212.04,206.04],
[1246406400000,211.94,204.60],
[1246492800000,218.87,198.12],
[1246838400000,201.04,204.99],
[1246924800000,204.99,206.99],
[1247011200000,206.99,211.94],
[1247097600000,211.94,212.13],
[1247184000000,212.13,218.87],
[1247443200000,218.87,218.87]
]
},
{
type: 'areasplinerange',
name: 'ADBE',
data: [
[1246233600000,212.29,220.04],
[1246320000000,212.04,220.04],
[1246406400000,211.94,219.60],
[1246492800000,228.87,230.12],
[1246838400000,211.04,225.99],
[1246924800000,214.99,236.99],
[1247011200000,216.99,221.94],
[1247097600000,221.94,222.13],
...