Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to compare multiple symbols programatically on a single tradingview chart?

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.

like image 814
Thoran Avatar asked Jan 20 '18 23:01

Thoran


People also ask

How do I compare symbols in Tradeview?

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.

How do you multi-chart in TradingView?

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.

How do you overlay indicators in Tradeview?

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.


1 Answers

You can do it by using createStudy() method detail here after Chart ready. For example: widget.chart().createStudy('Compare', false, false, ["open", 'APPL'])

like image 170
TrungNguyen Avatar answered Sep 22 '22 19:09

TrungNguyen