I need to create a chart similar to what is shown and explained at https://www.tradingview.com/wiki/Compare .
at https://www.tradingview.com/widget/advanced-chart/ I can create a custom chart but there is no option for multi-symbol chart.
There are more customization options at https://github.com/mmmy/css3demos/wiki/Charts-Customization-101 but no multi-symbol option.
This can of course be done manually. But it takes a lot of time to add 20 symbols every time I reload the page.
How to use in TradingView. To add a comparison to your current data series/chart, simply click on the Compare or Add symbol button (displayed as plus sign) on the toolbar along the top of the chart. Several popular symbols are already listed, which can be selected in order to be added to the chart.
To view multiple charts in TradingView. Click on the Select layout box. Select the number of charts you want. Click on the chart, click on the name and select the scrip based on your preference.
To have the indicator overlay properly, it needs to use the left price axis. That way the right price axis can be used for the instrument's values. The indicator's scale can be set programmatically with the scale argument of the study() function.
You can do it by using createStudy() method detail here after Chart ready.
For example:
widget.chart().createStudy('Compare', false, false, ["open", 'APPL'])
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With