title: How to setup tradingview charting library chart to update automatically?
body: <p>I am setting up a website displaying chart using tradingview chart library, and managed to setup chart to display from data feed. However once chart is loaded, the chart is not auto updating or refreshing with newer data without reloading webpage. How do I setup the chart to update automatically (eg. interval 1m, 5m etc)? This is the code I used:</p>
  <pre><code>    function initOnReady() {
          var widget = window.tvWidget = new TradingView.widget({
              // debug: true, // uncomment this line to see Library errors and warnings in the 
  
              fullscreen: true,
              symbol: 'AAPL',
              interval: '1D',
              container_id: &quot;tv_chart_container&quot;,
  
              //  BEWARE: no trailing slash is expected in feed URL
              datafeed: new Datafeeds.UDFCompatibleDatafeed(&quot;&lt;data feed url&gt;&quot;),
              library_path: &quot;charting_library/&quot;,
              locale: getParameterByName('lang') || &quot;en&quot;,
  
              disabled_features: [&quot;use_localstorage_for_settings&quot;],
  
              enabled_features: [&quot;study_templates&quot;],
              charts_storage_url: 'https://saveload.tradingview.com',
              charts_storage_url: 'http://{$smarty.server.HTTP_HOST}',
              charts_storage_api_version: &quot;1.1&quot;,
              client_id: 'tradingview.com',
              user_id: 'public_user_id',
          });
  
      };
  </code></pre>
  <p>Thanks in advance and appreciate for helps.</p>