ui_evaluate
Execute JavaScript in the TradingView page context to automate chart interactions, inspect UI state, and run advanced scripts that standard commands cannot handle.
Instructions
Execute JavaScript code in the TradingView page context for advanced automation
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": {
"expression": "<expression>"
},
"name": "ui_evaluate"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| expression | Yes | JavaScript expression to evaluate in the page context. Wrap in IIFE for complex logic. |