pine-script
하는 일
이 스킬은 거래 전략을 여러 거래 플랫폼용 지표나 전략 코드로 바꿉니다. 같은 아이디어를 여러 앱에서 쓰려는 트레이더를 위한 스킬입니다.
사용하는 경우
- ✓백테스트한 전략을 TradingView의 Pine Script로 옮기고 싶을 때.
- ✓TDX, THS, Eastmoney 같은 중국 플랫폼에서 같은 전략이 필요할 때.
- ✓쉬운 말로 설명한 전략에 대해 MetaTrader 5 코드가 필요한 경우.
스킬 링크
https://github.com/HKUDS/Vibe-Trading/blob/main/agent/src/skills/pine-script/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“제 이동평균 교차 전략을 TradingView와 MetaTrader 5용 코드로 바꿔 주세요.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
스킬은 전략의 설정과 로직을 읽은 뒤 각 플랫폼의 언어로 다시 씁니다. 모든 버전을 하나의 파일에 저장하고, 플랫폼마다 사용 안내를 함께 제공합니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
Overview
This skill exports a Vibe-Trading strategy to all major trading platforms in one go.
Output file: artifacts/strategy.pine (inside the run directory).
Supported platforms (always generate ALL):
| Group | Platforms | Language |
|---|---|---|
| International Charts | TradingView | Pine Script v6 |
| China Equities | 通达信 / 同花顺 / 东方财富 | TDX Formula |
| Forex / CFD | MetaTrader 5 | MQL5 |
Workflow: Export from Backtest
load_skill("pine-script")— read this guideread_file("config.json")— understand instruments, dates, parametersread_file("code/signal_engine.py")— understand the Python strategy logic- Translate the strategy to ALL platforms using the references below
write_file("artifacts/strategy.pine")— save the combined output- Return the code in a code block with usage instructions per platform
Workflow: Generate from Description
load_skill("pine-script")— read this guide- Write indicator/strategy code for ALL platforms based on the user's description
write_file("artifacts/strategy.pine")— save the combined output- Return the code with usage instructions
Output Format
The output file uses this structure (all platforms in one file):
================================================================================
TRADINGVIEW — Pine Script v6
Paste into: Pine Editor → New blank indicator → Add to Chart
================================================================================
[Pine Script code here]
================================================================================
通达信 / 同花顺 / 东方财富 (TDX Formula)
Paste into: 功能 → 公式管理器 → 新建指标公式
================================================================================
[TDX formula code here]
================================================================================
MT5 — MQL5
Save as: .mq5 file → MetaEditor → Compile → Navigator → Attach to Chart
================================================================================
[MQL5 code here]
Platform Reference
1. TradingView — Pine Script v6
Template
// This strategy was generated by Vibe-Trading
// Paste into TradingView Pine Editor → Add to Chart
//@version=6
strategy("Strategy Name", overlay=true, default_qty_type=strategy.percent_of_equity, default_qty_value=100, commission_type=strategy.commission.percent, commission_value=0.1, initial_capital=1000000)
// ============================================================================
// INPUTS
// ============================================================================
// [Group inputs logically with input.int(), input.float(), input.string()]
// ============================================================================
// CALCULATIONS
// ============================================================================
// [Core indicator calculations]
// ============================================================================
// CONDITIONS
// ============================================================================
longCondition = false
shortCondition = false
exitLongCondition = false
exitShortCondition = false
// ============================================================================
// STRATEGY EXECUTION
// ============================================================================
if longCondition
strategy.entry("Long", strategy.long)
if shortCondition
strategy.entry("Short", strategy.short)
if exitLongCondition
strategy.close("Long")
if exitShortCondition
strategy.close("Short")
// ============================================================================
// PLOTS
// ============================================================================
// [Visual overlays: moving averages, bands, signals]
// ============================================================================
// ALERTS
// ============================================================================
alertcondition(longCondition, title="Long Signal", message="Long entry signal triggered")
alertcondition(shortCondition, title="Short Signal", message="Short entry signal triggered")
Python → Pine Script Mapping
| Python (pandas/numpy) | Pine Script v6 |
|---|---|
df['close'].rolling(n).mean() |
ta.sma(close, n) |
df['close'].ewm(span=n).mean() |
ta.ema(close, n) |
ta.RSI(df['close'], n) or manual RSI |
ta.rsi(close, n) |
| `ta.MACD(df['c |
자주 묻는 질문
어떤 플랫폼으로 내보내나요?
TradingView, TDX, THS, Eastmoney, MetaTrader 5로 내보냅니다.
TradingView에는 어떤 언어를 쓰나요?
Pine Script 버전 6을 씁니다.
코드를 직접 써야 하나요?
아닙니다. 스킬이 코드를 작성하고, 사용자는 그것을 각 플랫폼의 편집기에 붙여 넣으면 됩니다.
상세 정보
작성자의 원본 설명
Export backtest strategies to indicator/strategy code for major trading platforms — TradingView, 通达信, 同花顺, 东方财富, MT5.
repo: HKUDS/Vibe-Trading
인기도
- GitHub 스타
- 37k
- 순위
- #7543
- 라이선스
- MIT
- 업데이트
- 2026. 11. 1.
댓글
- …
이 저장소의 다른 스킬
vibe-trading
37k에이전트에게 백테스트, 팩터 분석, 옵션 가격 결정, 여러 시장의 시장 데이터를 포함하는 완전한 금융 연구 도구 모음을 제공합니다.
adr-hshare
37k에이전트에게 미국 ADR과 홍콩 주식처럼 여러 시장에 상장된 중국 기업의 가격을 비교하는 방법을 보여 줍니다.
akshare
37k에이전트가 API 키 없이 중국과 해외 주식, 선물, 외환, 경제 지표의 무료 시장 데이터를 가져오도록 돕습니다.
alpha-zoo
37k에이전트가 만들어진 주식 팩터 라이브러리를 둘러보고, 선택한 시장에서 팩터 묶음이 수익률을 얼마나 잘 예측하는지 시험하도록 돕습니다.