技能详情(站内镜像,无评论)
许可证:MIT-0
MIT-0 ·免费使用、修改和重新分发。无需归因。
版本:v1.0.0
统计:⭐ 4 · 531 · 0 current installs · 0 all-time installs
⭐ 4
安装量(当前) 0
🛡 VirusTotal :可疑 · OpenClaw :良性
Package:alaa-eddine/pinets
安全扫描(ClawHub)
- VirusTotal :可疑
- OpenClaw :良性
OpenClaw 评估
The skill's requirements, instructions, and claimed purpose line up: it's an instruction-only wrapper describing how to run the pinets-cli tool to execute Pine Script indicators from the CLI.
目的
Name & description (PineScript executor) match the declared requirement (the 'pinets' binary) and the SKILL.md usage. The commands/examples all relate to running Pine Script indicators and producing JSON output.
说明范围
SKILL.md stays focused on running pinets and supplying candle data via symbol or --data JSON. It references fetching live Binance data (i.e., network access) and suggests using npx to run the CLI, which implicitly causes remote code execution when run via npx. The instructions do not ask the agent to read unrelated system files, environment secrets, or post outputs to arbitrary endpoints.
安装机制
The skill is instruction-only (no install spec), but the README suggests npm install -g or npx pinets-cli. Using npx will fetch and execute code from the npm registry on demand — expected for this tool but carries the usual risk of executing remote package code if you don't trust the package/source. The SKILL.md points to a GitHub repo (QuantForgeOrg/pinets-cli), which provides traceability.
证书
The skill declares no required environment variables or credentials. That is proportionate to the described use; SKILL.md does not ask for secrets. Note: if you run pinets and it fetches private/exchange APIs or requires API keys, the README does not document those keys — you should confirm requirements before providing any credentials.
持久
always is false and there is no install/daemon behavior. The skill does not request persistent elevated privileges or modifications to other skills/configs.
综合结论
This skill is coherent and appears to be a documentation wrapper for the pinets-cli npm tool. Before installing or running it: 1) prefer installing the pinets-cli package yourself (npm install -g) or inspect the package source on the linked GitHub repo rather than blindly running npx; npx downloads and runs code from the npm registry at runtime. 2) Be aware the CLI may fetch market data over the network (Binance or other endpoints) — confirm i…
安装(复制给龙虾 AI)
将下方整段复制到龙虾中文库对话中,由龙虾按 SKILL.md 完成安装。
请把本段交给龙虾中文库(龙虾 AI)执行:为本机安装 OpenClaw 技能「PineTS - PineScript executor」。简介:Run Pine Script indicators from the command line using pinets-cli. Use when ask…。
请 fetch 以下地址读取 SKILL.md 并按文档完成安装:https://raw.githubusercontent.com/openclaw/skills/refs/heads/main/skills/alaa-eddine/pinets/SKILL.md
(来源:yingzhi8.cn 技能库)
SKILL.md
---
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-cli — Run Pine Script Indicators from the Terminal
`pinets` is a CLI tool that executes TradingView Pine Script indicators via the [PineTS](https://github.com/QuantForgeOrg/PineTS) runtime. It outputs structured JSON with calculated indicator values.
## Installation
```bash
# 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):
```bash
pinets --version
```
When using `npx`, replace `pinets` with `npx pinets-cli` in all examples below.
## Core command
```
pinets run [file] [options]
```
The indicator can be a **file argument** or **piped from stdin**.
## Options
### Data source (one required)
| Flag | Description |
| ----------------------- | -------------------------------------------------------------------------------------------- |
| `-s, --symbol <ticker>` | Symbol from Binance (e.g., `BTCUSDT`, `ETHUSDT`, `SOLUSDT.P` for futures) |
| `-t, --timeframe <tf>` | Candle timeframe: `1`, `5`, `15`, `30`, `60`, `120`, `240`, `1D`, `1W`, `1M` (default: `60`) |
| `-d, --data <path>` | JSON file with candle data (alternative to `--symbol`) |
### Output
| Flag | Description |
| --------------------- | -------------------------------------------------------------- |
| `-o, --output <path>` | Write to file instead of stdout |
| `-f, --format <type>` | `default` (plots only) or `full` (plots + result + marketData) |
| `--pretty` | Pretty-print JSON |
| `--clean` | Filter out null, false, and empty values from plot data |
| `--plots <names>` | Comma-separated list of plot names to include (default: all) |
| `-q, --quiet` | Suppress info messages (essential when parsing stdout) |
### Candle control
| Flag | Description |
| ------------------- | -------------------------------------------------------- |
| `-n, --candles <N>` | Number of output candles (default: `500`) |
| `-w, --warmup <N>` | Extra warmup candles excluded from output (default: `0`) |
### Debug
| Flag | Description |
| --------- | ------------------------------------------- |
| `--debug` | Show transpiled JavaScript code (to stderr) |
## Usage patterns
### Run a .pine file with live Binance data
```bash
pinets run indicator.pine --symbol BTCUSDT --timeframe 60 --candles 100 -q
```
### Run with warmup (important for long-period indicators)
```bash
# EMA 200 needs at least 200 bars to initialize
pinets run ema200.pine -s BTCUSDT -t 1D -n 100 -w 200 -q
```
### Pipe Pine Script from stdin
```bash
echo '//@version=5
indicator("RSI")
plot(ta.rsi(close, 14), "RSI")' | pinets run -s BTCUSDT -t 60 -n 20 -q
```
### Run with custom JSON data
```bash
pinets run indicator.pine --data candles.json --candles 50 -q
```
### Save output to file
```bash
pinets run rsi.pine -s BTCUSDT -t 60 -o results.json -q
```
### Get full execution context
```bash
pinets run indicator.pine -s BTCUSDT -f full -q --pretty
```
### Filter signals with --clean (for signal-based indicators)
```bash
# 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
```
### Select specific plots with --plots
```bash
# 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
```
## Output structure
### `default` format
```json
{
"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.
## JSON data format (for --data)
```json
[
{
"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`.
## Pine Script quick reference
pinets-cli accepts standard TradingView Pine Script v5+:
```pinescript
//@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)
```
## Important notes
- **Always use `-q`** when parsing JSON output programmatically.
- **Warmup matters**: Indicators with long lookback periods (SMA 200, EMA 200) produce `NaN` for the first N bars. Use `--warmup` to pre-feed the indicator.
- **`time` values** are Unix timestamps in milliseconds.
- **Errors** go to stderr with exit code 1.
- The tool bundles PineTS internally — no additional npm packages are needed at runtime.
## Warmup recommendations
| 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.