pine_set_source
Inject or replace Pine Script source code in the active TradingView Monaco editor. Use it to deploy new scripts, apply fixes, or load templates when the Pine Editor panel is open.
Instructions
Inject Pine Script source code directly into the active Monaco editor model. WHEN TO USE: Call when deploying new Pine Script code, applying bug fixes, or loading templates. SIDE EFFECTS: STATE_MUTATING (Replaces entire Monaco editor text buffer). LIMITATIONS: Requires Pine Editor panel to be open.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| source | Yes | Pine Script source code to inject |