Actions21
- Alert Actions
- News Actions
- Chart Actions
- Screener Actions
- Symbol Actions
- Pine Script Actions
- Social Actions
- Analysis Actions
Pine Script → Execute
AI-generatedSummary
Execute custom Pine Script code on TradingView for a specified symbol and return the computed results.
Inputs
- Authentication — Choose the authentication method: Email & Password or OAuth2.
- Pine Script Code (required) — The Pine Script code to execute, typically a TradingView indicator or strategy script.
- Options — Optional settings including enabling AI-powered analysis, storing results in MongoDB, caching results in Redis with TTL, and respective connection strings for MongoDB and Redis.
- Symbol — The trading symbol on which to execute the Pine Script (e.g., BTCUSD). Defaults to BTCUSD if not set.
Output shape
a single JSON object per input item containing the execution result of the Pine Script with details including the symbol, original code, execution result, and a timestamp
The result may include additional AI analysis if enabled. Results can be cached and/or stored in a MongoDB database based on options. Errors during execution will be returned per item if 'Continue On Fail' is enabled.
Examples
Example 1: Run a Pine Script to plot closing prices for BTCUSD trading symbol using email & password authentication, with AI analysis enabled and caching active.
Set authentication to Email & Password; enter Pine Script code in the provided field; optionally specify a different symbol; enable or disable AI analysis, caching, and database storage as required.