Convert TradingView widget options
convert_widget_optionsTurns the options object of TradingView's widget (new TradingView.widget({...}): its options, disabled_features / enabled_features and overrides) into ChartWidget options, or Lightweight Charts' createChart options into Chart options.
Instructions
Turns the options object of TradingView's widget (new TradingView.widget({...}): its options, disabled_features / enabled_features and overrides) into ChartWidget options, or Lightweight Charts' createChart options into Chart options. Returns the options, the calls to make once the chart exists, what has no place (each with what to do), and what validate_options finds in the result. Write functions and other code as strings; they are carried as they are.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"options": "<options>"
},
"name": "convert_widget_options"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| source | No | The library the app uses now: 'tradingview' (Advanced Charts, Trading Platform; the default) or 'lightweight-charts'. | |
| options | Yes | The old options object, as JSON. |