代码之家  ›  专栏  ›  技术社区  ›  ankush981

布林线的正确值顺序

  •  1
  • ankush981  · 技术社区  · 7 年前

    我想用官方海图文档中的布林线演示。 here 以下内容:

    $.getJSON('https://www.highcharts.com/samples/data/aapl-ohlc.json', function (data) {
    
        Highcharts.stockChart('container', {
    
            rangeSelector: {
                selected: 2
            },
    
            title: {
                text: 'AAPL Stock Price'
            },
    
            legend: {
                enabled: true
            },
    
            plotOptions: {
                series: {
                    showInLegend: true
                }
            },
    
            series: [{
                type: 'ohlc',
                id: 'aapl',
                name: 'AAPL Stock Price',
                data: data
            }, {
                type: 'bb',
                linkedTo: 'aapl'
            }]
        });
    });
    

    当我访问提供的JSON链接时( https://www.highcharts.com/samples/data/aapl-ohlc.json ,我看到的数据格式如下:

    [
      [
        1467984600000,
        96.49,
        96.89,
        96.05,
        96.68,
      ],
      [
        1468243800000,
        96.75,
        97.65,
        96.73,
        96.98,
      ],   
      ...
    ]
    

    我困惑的是这些值依次代表了什么。第一个肯定是时间戳;第二个应该是运行平均值…接下来的三个是什么?请注意,我理解布林线背后的想法,并做了必要的计算,但我认为我没有得到一个带,因为我不确定的顺序。

    事先谢谢!

    1 回复  |  直到 7 年前
        1
  •  1
  •   Halvor Holsten Strand mtorres    7 年前

    defined in the API

    x,open,high,low,close

    {
        x: 1,
        open: 3,
        high: 4,
        low: 5,
        close: 2,
        name: "Point name"
    }
    

    indicators.js bollinger-bands.js bb ohlc

    plotOptions seen in the API

    推荐文章