JorrinKievit / react-ts-tradingview-widgets

This is a React component library for TradingView Widgets
https://tradingview-widgets.jorrinkievit.xyz/
MIT License
154 stars 48 forks source link

Set 5Y as a default time range #54

Closed SergeySypalo closed 9 months ago

SergeySypalo commented 9 months ago

Hi Jorrin, thx you for the nice library, but how can I display the SymbolOverview widget with a time range set to 5 years instead of 1 day?

JorrinKievit commented 9 months ago

You can set the default in the symbols array. You can find extra information on tradingview's site -> https://www.tradingview.com/widget/symbol-overview/ Defaults of 1D or a year:

  "symbols": [
    [
      "Apple",
      "AAPL|1D"
    ],
    [
      "Google",
      "GOOGL|1D"
    ],
    [
      "Microsoft",
      "MSFT|1D"
    ],
    [
      "AMEX:SPY|12M"
    ]
  ],