Run Pine Script indicators from the command line using pinets-cli. Use when asked to execute, test, or analyze Pine Script indicators, calculate technical an...
数据来源:ClawHub。 在 ClawSkills 查看
选择你使用的 Agent
方法一:命令行安装(推荐)
推荐(无需提前安装 clawhub)
npx clawhub@latest --dir ~/.claude/skills install pinets或使用 clawhub CLI(需提前安装)
clawhub --dir ~/.claude/skills install pinets⚠️ 需要 Node.js 18+,没有 Node?请使用下方方法二直接下载 ZIP。 安装 Node.js →
方法二:手动下载安装(无需 Node)
下载 ZIP,解压后将文件夹放到以下路径,重启 Agent 即可:
安装路径
~/.claude/skills/pinets/💡解压后将文件夹放到上方路径,重启 Agent 即可生效
--- name: pinets description: Run Pine Script indicators from the command line using pinets-cli. Use when asked to execute, test, or analyze Pine Script indicators, calculate technical analysis values (RSI, SMA, EMA, MACD, etc.), or fetch market data for crypto trading pairs. This tool can run PineScript indicators from .pine files or stdin and output the resulting plots and variables data. version: 1.0.0 metadata: openclaw: requires: bins: - pinets primaryEnv: "" emoji: "\U0001F4C8" homepage: https://github.com/QuantForgeOrg/pinets-cli ---
pinets is a CLI tool that executes TradingView Pine Script indicators via the PineTS runtime. It outputs structured JSON with calculated indicator values.
# Global install
npm install -g pinets-cli
# Or run directly with npx (no install needed)
npx pinets-cli run indicator.pine --symbol BTCUSDT -q
Verify (if installed globally):
pinets --version
When using npx, replace pinets with npx pinets-cli in all examples below.
pinets run [file] [options]
The indicator can be a file argument or piped from stdin.
| Flag | Description |
| ----------------------- | -------------------------------------------------------------------------------------------- |
| -s, --symbol | Symbol from Binance (e.g., BTCUSDT, ETHUSDT, SOLUSDT.P for futures) |
| -t, --timeframe | Candle timeframe: 1, 5, 15, 30, 60, 120, 240, 1D, 1W, 1M (default: 60) |
| -d, --data | JSON file with candle data (alternative to --symbol) |
| Flag | Description |
| --------------------- | -------------------------------------------------------------- |
| -o, --output | Write to file instead of stdout |
| -f, --format | default (plots only) or full (plots + result + marketData) |
| --pretty | Pretty-print JSON |
| --clean | Filter out null, false, and empty values from plot data |
| --plots | Comma-separated list of plot names to include (default: all) |
| -q, --quiet | Suppress info messages (essential when parsing stdout) |
| Flag | Description |
| ------------------- | -------------------------------------------------------- |
| -n, --candles | Number of output candles (default: 500) |
| -w, --warmup | Extra warmup candles excluded from output (default: 0) |
| Flag | Description |
| --------- | ------------------------------------------- |
| --debug | Show transpiled JavaScript code (to stderr) |
pinets run indicator.pine --symbol BTCUSDT --timeframe 60 --candles 100 -q
# EMA 200 needs at least 200 bars to initialize
pinets run ema200.pine -s BTCUSDT -t 1D -n 100 -w 200 -q
echo '//@version=5
indicator("RSI")
plot(ta.rsi(close, 14), "RSI")' | pinets run -s BTCUSDT -t 60 -n 20 -q
pinets run indicator.pine --data candles.json --candles 50 -q
pinets run rsi.pine -s BTCUSDT -t 60 -o results.json -q
pinets run indicator.pine -s BTCUSDT -f full -q --pretty
# Without --clean: 500 entries, mostly false
pinets run ma_cross.pine -s BTCUSDT -t 1D -n 500 -q
# With --clean: Only actual signals
pinets run ma_cross.pine -s BTCUSDT -t 1D -n 500 --clean -q
# Get only RSI, ignore bands
pinets run rsi_bands.pine -s BTCUSDT --plots "RSI" -q
# Get only Buy and Sell signals
pinets run signals.pine -s BTCUSDT --plots "Buy,Sell" -q
# Combine both: only signals, only true values
pinets run signals.pine -s BTCUSDT --plots "Buy,Sell" --clean -q
default format
{
"indicator": {
"title": "RSI",
"overlay": false
},
"plots": {
"RSI": {
"title": "RSI",
"options": { "color": "#7E57C2" },
"data": [
{ "time": 1704067200000, "value": 58.23 },
{ "time": 1704070800000, "value": 61.45 }
]
}
}
}
full format
Adds result (raw return values per bar) and marketData (OHLCV candles) to the default output.
[
{
"openTime": 1704067200000,
"open": 42000.5,
"high": 42500.0,
"low": 41800.0,
"close": 42300.0,
"volume": 1234.56,
"closeTime": 1704070799999
}
]
Required fields: open, high, low, close, volume. Recommended: openTime, closeTime.
pinets-cli accepts standard TradingView Pine Script v5+:
//@version=5
indicator("My Indicator", overlay=false)
// Technical analysis functions
rsi = ta.rsi(close, 14)
[macdLine, signalLine, hist] = ta.macd(close, 12, 26, 9)
sma = ta.sma(close, 20)
ema = ta.ema(close, 9)
bb_upper = ta.sma(close, 20) + 2 * ta.stdev(close, 20)
// Output — each plot() creates a named entry in the JSON output
plot(rsi, "RSI", color=color.purple)
-q when parsing JSON output programmatically.
NaN for the first N bars. Use --warmup to pre-feed the indicator.
time values are Unix timestamps in milliseconds.
| Indicator | Minimum warmup | | ------------------- | -------------- | | SMA(N) / EMA(N) | N | | RSI(14) | 30 | | MACD(12,26,9) | 50 | | Bollinger Bands(20) | 30 | | SMA(200) | 200+ |
Rule of thumb: set warmup to 1.5x-2x the longest lookback period.
安装 PineTS - PineScript executor 后,可以对 AI 说这些话来触发它
Help me get started with PineTS - PineScript executor
Explains what PineTS - PineScript executor does, walks through the setup, and runs a quick demo based on your current project
Use PineTS - PineScript executor to run Pine Script indicators from the command line using pinets-cli
Invokes PineTS - PineScript executor with the right parameters and returns the result directly in the conversation
What can I do with PineTS - PineScript executor in my finance & investment workflow?
Lists the top use cases for PineTS - PineScript executor, with example commands for each scenario
将技能文件夹放到 ~/.claude/skills/pinets/ 目录(个人级,所有项目可用),或 .claude/skills/pinets/(项目级)。重启 AI 客户端后,用 /pinets 主动调用,或让 AI 根据上下文自动发现并使用。
PineTS - PineScript executor 支持 Claude、Cursor、OpenClaw,可与这些 AI 平台无缝集成,扩展其能力。
PineTS - PineScript executor 可免费安装使用。请查阅仓库了解许可证信息。
Run Pine Script indicators from the command line using pinets-cli. Use when asked to execute, test, or analyze Pine Script indicators, calculate technical an...
PineTS - PineScript executor 属于「Finance & Investment」分类,该分类的技能帮助 AI 智能体在此领域执行专业任务。
Automate my finance & investment tasks using PineTS - PineScript executor
Identifies repetitive steps in your workflow and sets up PineTS - PineScript executor to handle them automatically