Skip to main content
Version: v25

Frequently Asked Questions

If your question is not outlined below, you can ask it on GitHub Issues 🔐 (restricted access) or join the Discord discussions.

Data Management

1. How do I connect my data? How to add new symbols?

Refer to the following articles for information on how to connect data:

Also, consider the Datafeed: Common Issues article to avoid typical errors when implementing the Datafeed API.

Use the Demo Chart to investigate how the library processes data. Open the Network tab in a browser console and filter requests by demo-feed to see all data requests and responses.

2. Do you have an example of the Datafeed API implementation?

You can consider UDF Adapter 🔐 (restricted access) as an example of the Datafeed API implementation.

If you need a step-by-step guide, refer to the How to connect data via Datafeed API tutorial.

3. Do you have an example of a WebSocket data transport?

The How to connect data via Datafeed API tutorial shows how to stream data using WebSocket.

4. Do you have an example of a backend datafeed in ASP.NET, Python, PHP, etc. ?

The only example of a backend datafeed that we have is written in JavaScript for Node.js. For more information, refer to the yahoo_datafeed repository.

5. How can I display data stored in a TXT/CSV/XLSX file?

The library is intended to display data from a server, not a file. You should also keep in mind that according to the license agreement you can use the library on public websites only. If you still want to use a file as a data source, complete the following steps:

  1. Write an application using any server language (.NET, PHP, Node.js, Python, etc.). This application should read a file and transfer data from it in the UDF format over HTTP(S).

    Note: You can provide data in another format or use a WebSocket to transfer it, but in this case you need a custom Datafeed API implementation.

  2. Make sure a browser can send requests to your server. For this, you should either have a static IP or register a domain.

  3. Open index.html and replace demo_feed.tradingview.com with the URL to your server.

6. Why my data is not displayed / displayed incorrectly / incorrectly fetched from the server?

The first thing you should do to debug any issue is to enable console logs. These logs contain the most important actions performed in the library. You can also refer to the Datafeed: Common Issues article that might answer your question.

Note that most data issues occur because symbol information is set incorrectly. To avoid these issues, consider Symbology.

7. The library is constantly asking for data. How to tell it that the data is over?

To do this, you should use a flag that notifies the library that there is no more data on the server. Set the status code to no_data or the noData property to true if you use UDF or Datafeed API, respectively.

8. How to change the number of decimal places for prices on the chart?

The number of decimal places depends on the pricescale value. For more information on the price format, refer to the Symbology article.

9. What if I have a single price for each timestamp?

Since the library is intended to display multiple data types like candles, bars, and histograms, you are supposed to provide Open, High, Low, Close, and optional Volume for each timestamp. If you have a single price for each timestamp, you can pass Open = High = Low = Close = price. For better data visualization, you can change the default chart style to “Line” (refer to the GUI section).

10. Why is `unsubscribeBars` called with a delay?

This is intentional.

Refer to the unsubscribeBars method for more information.

GUI

1. How can I subscribe to chart events?

You can subscribe to chart events in two ways:

  • Subscribe to general events that are related to a whole chart layout, not a specific chart.

  • Subscribe to events that are related to a single chart.

Some methods that expose events only allow a subscription to be created by passing a single callback function, others return a Subscription object that can be used to subscribe and unsubscribe.

2. How to change the default bar style?

Specify the overrides property in the Widget Constructor and add the mainSeriesProperties.style key. All supported styles are listed in the Overrides article.

3. How to customize the chart style?

You can add a CSS file to customize UI element colors. For more information, refer to CSS Color Themes.

4. How can I change the list of resolutions (time intervals) on the chart / disable them?

For more information on resolutions, refer to the following topic: Symbology.

5. How to enable the resolution in seconds?

For more information on resolutions in seconds, refer to the following topic: Symbology.

6. How to hide a GUI element (symbol, interval, button, etc.)?

Most of GUI elements can be hidden using Featuresets. There are base elements that cannot be hidden, but if you still want to get rid of them, you can use CSS customization. Note that names, classes, and identifiers of the DOM elements may be changed in the next versions of the product without any notifications.

7. Why do the Ask/Bid buttons not work?

Make sure you have implemented the getQuotes method.

Other Questions

1. What is the difference between Widget, Advanced Charts, and Trading Terminal?
  • Widget is connected to the TradingView data. Perfect for websites, blogs, and forums where you need a fast & free solution.

    Integration is simply copying & pasting pre-made iframe code. Widget has lots of display modes.

  • Advanced Charts is a chart with your data.

    This is a standalone solution that you download, host on your servers, and connect your data to. You can use it in your site/app for free.

  • Trading Terminal is a standalone product that is licensed to brokers.

    It contains all features available in Advanced Charts and also includes trading functionality, multiple chart layouts, watchlists, details, news widgets, and other advanced tools. Trading Terminal has its own licensing fees associated with it.

2. How do I add a custom indicator?

Refer to Creating Custom Studies for more information on custom indicators.

3. Does the library support Rocket Loader by Cloudflare?

No, it doesn't. Please avoid using Rocket Loader.

4. Do you provide iOS or Android SDKs like you do for Lightweight Charts?

No, not currently.

5. How to integrate the library with Flutter?

We do not have an example for integrating the library with Flutter currently. You can consider the How to Build a Native Communication Bridge in Flutter with WebView and JavaScript article that explains how to use Flutter with WebView and JavaScript.

6. How to switch from Advanced Charts to Trading Terminal?

Refer to the Trading Terminal topic for more information.

7. Is it possible to use Pine Script® for creating and editing indicators?

Pine Script® is not supported in Advanced Charts or Trading Terminal. Alternatively, you can create your custom indicator using JavaScript. For more information, refer to Custom Studies.

8. Does Advanced Charts / Trading Terminal support Alerts, Range Bars, and Bar Replay Tool?

Some features that are available on tradingview.com are not supported in the libraries, including Alerts, Range Bars, and Bar Replay Tool. Refer to the Unsupported features section for more information.