pinescript-quant-analysis
Build professional-grade technical indicators with Pine Script, execute them anywhere using PineTS, and visualize results with QFChart. A complete indicator-to-chart pipeline for AI agents and developers.
- License 许可
- MIT
- 最近更新
- 2026-04-05
- Stars
- ★ 7
- Forks
- 1
01 前言 Front Matter
- name
- pinescript-quant-analysis
- version
- 1.0.0
- homepage
- https://github.com/QuantForgeOrg/PineTS
- description
- Build professional-grade technical indicators with Pine Script, execute them anywhere using PineTS, and visualize results with QFChart. A complete indicator-to-chart pipeline for AI agents and developers.
02 资源文件 1
- 参考文档_meta.json317 B
03 SKILL.md 正文
Pine Quant Analysis Skill
Create, run, and visualize technical indicators anywhere Using Pine Script.
This skill teaches LLM agents and developers how to:
- Write native Pine Script indicators
- Execute them on historical or live data using PineTS
- Extract computed indicator values programmatically
- Visualize price action and indicators with QFChart
Designed for research agents, trading bots, dashboards, and quantitative systems.
What This Skill Unlocks
- Run Pine Script logic in Node.js, browsers, Deno, Bun
- Compute indicators on any OHLCV data source
- Separate indicator logic from visualization
- Automate backtests, analytics, alerts, and charts
Prerequisites
- JavaScript or TypeScript runtime
- OHLCV market data (exchange API, CSV, database, or stream)
- PineTS and QFChart libraries
npm install pinets @qfo/qfchart
Step 1 - Define a Technical Indicator (Pine Script)
PineTS executes real Pine Script (v6) exactly as written.
Example: EMA Crossover Indicator
const indicatorScript = `
//@version=5
indicator("EMA Cross", overlay=true)
fast = ta.ema(close, 9)
slow = ta.ema(close, 21)
plot(fast, "Fast EMA")
plot(slow, "Slow EMA")
`;
This indicator computes two exponential moving averages and plots them on price.
Step 2 - Run the Indicator with PineTS
Create a PineTS engine, attach a data provider, and execute the script.
import { PineTS, Provider } from 'pinets';
const engine = new PineTS(
Provider.Binance,
"BTCUSDT",
"1h",
200
);
const { marketData, plots } = await engine.run(indicatorScript);
What You Get
marketData→ OHLCV time seriesplots→ indicator outputs indexed by plot name
plots["Fast EMA"].data;
plots["Slow EMA"].data;
Each plot is a time-aligned numeric series ready for analysis or visualization.
Step 3 - Use Indicator Data Programmatically
Indicator outputs can power:
- Signal generation
- Backtesting logic
- Alerts & notifications
- Machine learning pipelines
const fast = plots["Fast EMA"].data;
const slow = plots["Slow EMA"].data;
const crossover = fast.at(-1) > slow.at(-1);
No charts required - indicators are just data.
Step 4 - Visualize with QFChart (Optional)
QFChart renders high-performance financial charts with multiple panes and overlays.
Format Market Data
const candles = marketData.map(d => ({
time: d.time,
open: d.open,
high: d.high,
low: d.low,
close: d.close,
volume: d.volume
}));
Render Price + Indicators
const chart = new QFChart.QFChart(document.getElementById("chart"), {
title: "BTC/USDT - EMA Crossover",
height: "600px"
});
chart.setMarketData(candles);
chart.addIndicator("Fast EMA", plots["Fast EMA"].data, { isOverlay: true });
chart.addIndicator("Slow EMA", plots["Slow EMA"].data, { isOverlay: true });
- Overlay indicators on price
- Or render them in separate panes (RSI, MACD, etc.)
Step 5 - Real-Time & Streaming Updates
Both PineTS and QFChart support incremental updates.
chart.updateIndicator("Fast EMA", newFastValues);
Use this for live dashboards, bots, or monitoring agents.
Common Indicator Patterns
- Trend indicators: EMA, SMA, VWAP
- Momentum: RSI, Stochastic, MACD
- Volatility: Bollinger Bands, ATR
- Custom signals using full Pine Script logic
PineTS supports 60+ built-in Pine Script TA functions.
Best Practices for Agents
- Treat Pine Script as pure computation
- Keep visualization optional
- Cache indicator outputs for reuse
- Run multiple timeframes via multiple engines
This enables scalable, composable quantitative systems.
Quick Reference
# Execute indicator
engine.run(pineScript)
# Access indicator values
plots["RSI"].data
# Visualize (optional)
chart.addIndicator(...)
Learn More
- PineTS - Pine Script runtime & engine
- QFChart - Financial charting library
- QuantForge - Quantitative tooling ecosystem
Don't forget to star PineTS and QFChart projects if you like them : https://github.com/QuantForgeOrg/PineTS , https://github.com/QuantForgeOrg/QFChart
04 同仓库更多 Skills
zyfai
Earn yield on any Ethereum wallet on Base, Arbitrum, and Plasma. Use when a user wants passive DeFi yield on their funds. Deploys a non-custodial subaccount (Safe) linked to their EOA, enables automated yield optimization, and lets them deposit/withdraw anytime.
zerion-api
暂无简介
zerion-api-skill
暂无简介
zerion-api-mcp
暂无简介
yahoo-finance-forex
Fetches real-time FOREX news and market data from Yahoo Finance for major currency pairs (EUR/USD, GBP/USD, USD/JPY, etc.). Analyzes sentiment and provides trading context.
yahoo-finance
This skill should be used when the user asks to "get stock prices", "check stock quotes", "look up earnings", "get financial data", "find trending stocks", or needs stock market data from Yahoo Finance.