script_import_pine
Import a Pine v5 or v6 strategy or indicator as a cubicle.script, with the runner's own importer (cubicle-script import-pine). It answers the script (YAML, validated before it is handed out), the importer's notes (where Pine and the runner differ: fills, warm-up, na) and its header. A construct outside the subset is refused, never guessed: each diagnostic names its code (C057 a construct with no faithful translation: a while loop, a loop past 64 steps or over a range the bars decide, an array outside a capped var list of levels, maps, types, strings, the wall clock; bounded for loops, constant and display arrays and var level lists do translate, the last as 1.1 pools; C058 a second market, C059 not translated yet, C040 lookahead_on), the construct, the rule it breaks, its Pine line and what the code means. The translation goes on past a refusal, so every refused statement is listed at once. Say the refusal plainly and offer the rewrite the code suggests. At most 64 KB of Pine. Free.
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": {
"pine": "<pine>"
},
"name": "script_import_pine"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tf | No | the bar size (1s, 15s, 1m, 5m, 15m, 30m, 1h, 4h, 1d); the importer's default when left out | |
| name | No | the script's name (lower case, digits, . _ -); imported when left out | |
| pine | Yes | the Pine source text (//@version=5 or 6) | |
| market | No | the market the script reads (NQ, ES, BTC, ETH, SOL); the importer's default when left out |