How to include RSI and Volume in the same chart?

2019-09-11 01:15发布

问题:

First of all i want to embed RSI plugin with the highstock chart, (i.e) RSI, Volume in the same chart. i tried it with using Highstock (Two panes, candlestick and volume )

http://www.highcharts.com/stock/demo/candlestick-and-volume 

and the RSI indicator plugin

http://jsfiddle.net/BlackLabel/RE7sS/

Any ideas to get it done??

回答1:

To add RSI to any Highstock demo, you need to include required files. In RSI case files are:

  • indicators.js (base)
  • ema.js (required for RSI)
  • rsi.js (RSI plugin)

And example for you: http://jsfiddle.net/jLpbL1db/

Note:

Don't forget to add indicator in options, with link to series.id:

        indicators: [{
            id: "AAPL",
            type: "rsi"
        }],