5

Right now, I know how to define default inputs for indicators of the widget (see code below). But I want to define default styles. I have not found the right way to do it. Anyone knows?

 var chart = new TradingView.widget(
    {
      autosize: true,
      symbol: "OANDA:EURUSD",
      interval: "3",
      timezone: "America/Bogota",
      theme: "dark",
      style: "1",
      locale: "en",

      hide_side_toolbar: true,
      hide_top_toolbar: false,
      toolbar_bg: "#f1f3f6",
      enable_publishing: false,
      allow_symbol_change: true,
      details: false,

      hidevolume: true,

      studies: [

        {
          id: "IchimokuCloud@tv-basicstudies",
          version: 2.0

        },
        {
          id: "Stochastic@tv-basicstudies",
          inputs: {
            K: 3,
          }
        }
      ],
      container_id: "tradingview_7f23e"
    }
  );
Nicolas Torres
  • 171
  • 1
  • 4
  • What do you mean by default styles ? you want to apply your own custom styles ? – Ben.S Apr 21 '21 at 02:39
  • I want to configure some styles of the indicators, by default. For examble, stochastic lines have a color, I want them to be blue and white by default, as soon as I load the widget. Thanks in advance if you can help me. – Nicolas Torres Apr 22 '21 at 02:15
  • 1
    @NicolasTorres: Same problem here. Very hard to find any documentation... – OlivierLarue May 07 '21 at 11:12

1 Answers1

0

You should pay for tradingview and check the documentation. but

studies_overrides: {
    "volume.volume.color.0": "#00FFFF",
},

i think is your answer. search for studies_overrides

Amir Rezvani
  • 1,262
  • 11
  • 34