Problems with Trading View

0

My best regards, my friend, I am developing an exchange of cryptocurrencies which I have to generate a candlestick chart. I am occupying the library charting library of tradingview, the doubt that I have is how to insert data into the graph. I leave the script of my graphic I would greatly appreciate your help.

Greetings.

  function getParameterByName(name) {
      name = name.replace(/[\[]/, "\[").replace(/[\]]/, "\]");
      var regex = new RegExp("[\?&]" + name + "=([^&#]*)"),
              results = regex.exec(location.search);
      return results === null ? "" : decodeURIComponent(results[1].replace(/\+/g, " "));
  }

  TradingView.onready(function()
  {
    var widget = new TradingView.widget({
      height: '100%', 
      width: '100%',
      symbol: 'AAPL',
      interval: 'D',
      "enable_publishing": false,
      container_id: "tv_chart_container",
      hide_legend: true,
      //  BEWARE: no trailing slash is expected in feed URL
      datafeed: new Datafeeds.UDFCompatibleDatafeed("https://demo_feed.tradingview.com"),
      library_path: "charting_library/",
      locale: getParameterByName('lang') || "es",
      //  Regression Trend-related functionality is not implemented yet, so it's hidden for a while
      drawings_access: { type: 'black', tools: [ { name: "Regression Trend" } ] },
      disabled_features: ["use_localstorage_for_settings"],
      preset: "mobile",
      overrides: {
        "paneProperties.background": "#222222",
                    "paneProperties.vertGridProperties.color": "#454545",
                    "paneProperties.horzGridProperties.color": "#454545",
        "symbolWatermarkProperties.transparency": 90,
        "scalesProperties.textColor" : "#AAA"
      }
    });
  })
    
asked by Ivan Horstmeier 20.08.2018 в 16:26
source

0 answers