TqSdk Trading and Data
shinnytech/tqsdk-python
Answers TqSdk Python questions on market data, accounts, orders, margin trials, simulation and backtesting, using the library's own docs and examples.
Translates a Python backtest strategy or a plain description into Pine Script v6, TDX formulas and MQL5 code for TradingView, Chinese broker terminals and MetaTrader 5.
$ npx skills add HKUDS/Vibe-Trading --skill pine-script -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install HKUDS/Vibe-Trading pine-script --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/HKUDS/Vibe-Trading.git skills-src && mkdir -p .claude/skills && cp -r skills-src/agent/src/skills/pine-script .claude/skills/pine-script && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "pine-script" agent skill from https://github.com/HKUDS/Vibe-Trading/tree/main/agent/src/skills/pine-script into .claude/skills/pine-script/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "pine-script", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/HKUDS/Vibe-Trading/tree/main/agent/src/skills/pine-scriptType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add HKUDS/Vibe-Trading --skill pine-script -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install HKUDS/Vibe-Trading pine-script --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/HKUDS/Vibe-Trading.git skills-src && mkdir -p .agents/skills && cp -r skills-src/agent/src/skills/pine-script .agents/skills/pine-script && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "pine-script" agent skill from https://github.com/HKUDS/Vibe-Trading/tree/main/agent/src/skills/pine-script into .agents/skills/pine-script/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "pine-script", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add HKUDS/Vibe-Trading --skill pine-script -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install HKUDS/Vibe-Trading pine-script --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/HKUDS/Vibe-Trading.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/agent/src/skills/pine-script .cursor/skills/pine-script && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "pine-script" agent skill from https://github.com/HKUDS/Vibe-Trading/tree/main/agent/src/skills/pine-script into .cursor/skills/pine-script/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "pine-script", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/HKUDS/Vibe-Trading.git --path agent/src/skills/pine-script--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add HKUDS/Vibe-Trading --skill pine-script -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install HKUDS/Vibe-Trading pine-script --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/HKUDS/Vibe-Trading.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/agent/src/skills/pine-script .gemini/skills/pine-script && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "pine-script" agent skill from https://github.com/HKUDS/Vibe-Trading/tree/main/agent/src/skills/pine-script into .gemini/skills/pine-script/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "pine-script", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install HKUDS/Vibe-Trading pine-scriptInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add HKUDS/Vibe-Trading --skill pine-script -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/HKUDS/Vibe-Trading.git skills-src && mkdir -p .github/skills && cp -r skills-src/agent/src/skills/pine-script .github/skills/pine-script && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "pine-script" agent skill from https://github.com/HKUDS/Vibe-Trading/tree/main/agent/src/skills/pine-script into .github/skills/pine-script/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "pine-script", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add HKUDS/Vibe-Trading --skill pine-script -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install HKUDS/Vibe-Trading pine-script --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/HKUDS/Vibe-Trading.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/agent/src/skills/pine-script .opencode/skills/pine-script && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "pine-script" agent skill from https://github.com/HKUDS/Vibe-Trading/tree/main/agent/src/skills/pine-script into .opencode/skills/pine-script/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "pine-script", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
pine-scriptTranslates a Python backtest strategy or a plain description into Pine Script v6, TDX formulas and MQL5 code for TradingView, Chinese broker terminals and MetaTrader 5.
The skill always produces code for every supported platform in one file, artifacts/strategy.pine: Pine Script v6 for TradingView, TDX formula code for 通达信, 同花顺 and 东方财富, and MQL5 for MetaTrader 5. When exporting from a backtest, the agent reads config.json for instruments, dates and parameters and code/signal_engine.py for the strategy logic, translates the logic for each platform and saves the combined output.
A second workflow writes indicator or strategy code directly from your description. The output file lays the platforms out in sections with paste-in instructions for each, and the agent returns the code with usage notes per platform. A mapping table converts pandas and numpy idioms, such as rolling means, EMA, RSI, MACD, rolling standard deviation and highs and lows, into their Pine Script v6 equivalents.
3 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit 7f6908b. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
No scripts in the folder and no shell commands in SKILL.md (its code samples are pinescript and mql5).
From the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Strategy Export to Pine Script and More loads about 3.8k tokens when it runs. Until then it costs about 32 tokens; SKILL.md has 987 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from HKUDS/Vibe-Trading at commit 7f6908b, republished under its MIT licence (© HKUDS). 987 words, ~3,750 tokens.
.claude/skills/pine-script/SKILL.md (or your agent's skills folder).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 |
load_skill("pine-script") — read this guideread_file("config.json") — understand instruments, dates, parametersread_file("code/signal_engine.py") — understand the Python strategy logicwrite_file("artifacts/strategy.pine") — save the combined outputload_skill("pine-script") — read this guidewrite_file("artifacts/strategy.pine") — save the combined outputThe 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]
// 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 (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['close']) | [macdLine, signalLine, hist] = ta.macd(close, 12, 26, 9) |
df['close'].rolling(n).std() | ta.stdev(close, n) |
df['high'].rolling(n).max() | ta.highest(high, n) |
df['low'].rolling(n).min() | ta.lowest(low, n) |
df['close'].pct_change(fill_method=None) | (close - close[1]) / close[1] |
df['volume'].rolling(n).mean() | ta.sma(volume, n) |
df['close'] > df['close'].shift(1) | close > close[1] |
| Bollinger Bands | [mid, upper, lower] = ta.bb(close, length, mult) |
| ATR | ta.atr(length) |
| ADX | ta.adx(high, low, close, length) |
| Stochastic | ta.stoch(close, high, low, length, smoothK, smoothD) |
| CCI | ta.cci(close, length) |
| Williams %R | ta.wpr(length) |
| MFI | ta.mfi(close, length) |
| OBV | ta.obv |
| VWAP | ta.vwap |
| Python | Pine Script v6 |
|---|---|
df['open'] | open |
df['high'] | high |
df['low'] | low |
df['close'] | close |
df['volume'] | volume |
df.index (datetime) | time |
df['close'].shift(n) | close[n] |
| Python Pattern | Pine Script v6 |
|---|---|
(fast > slow) & (fast.shift(1) <= slow.shift(1)) | ta.crossover(fast, slow) |
(fast < slow) & (fast.shift(1) >= slow.shift(1)) | ta.crossunder(fast, slow) |
signal.where(condition, 0) | condition ? value : 0 |
np.where(cond, val_true, val_false) | cond ? val_true : val_false |
signal.clip(-1, 1) | math.max(-1, math.min(1, signal)) |
signal.fillna(0) | nz(signal, 0) |
pd.isna(value) | na(value) |
| Python Pattern | Pine Script v6 |
|---|---|
| Equal weight 1/N | strategy.percent_of_equity with default_qty_value = 100/N |
| Full position on signal=1.0 | default_qty_type=strategy.percent_of_equity, default_qty_value=100 |
| Half position on signal=0.5 | Use strategy.entry(..., qty=strategy.equity * 0.5 / close) |
| Stop-loss | strategy.exit("Exit", stop=entryPrice * (1 - stopPct)) |
| Take-profit | strategy.exit("Exit", limit=entryPrice * (1 + tpPct)) |
//@version=6text = condition ? "a" : "b"plot(condition ? value : na)barstate.isconfirmed, lookahead=barmerge.lookahead_offThese platforms share 95%+ identical formula syntax. Write ONE version that works on all three.
{Vibe-Trading 策略导出}
{策略名称: XXX}
{——————— 参数 ———————}
N:=14;
M:=6;
{——————— 指标计算 ———————}
RSI_VAL:=RSI(CLOSE,N);
MA_FAST:=MA(CLOSE,5);
MA_SLOW:=MA(CLOSE,20);
{——————— 买卖信号 ———————}
BUY:CROSS(MA_FAST,MA_SLOW) AND RSI_VAL<40,COLORRED;
SELL:CROSS(MA_SLOW,MA_FAST) AND RSI_VAL>60,COLORGREEN;
DRAWTEXT(BUY,LOW,'B'),COLORYELLOW;
DRAWTEXT(SELL,HIGH,'S'),COLORWHITE;| Python | TDX Formula |
|---|---|
df['close'].rolling(n).mean() | MA(CLOSE,N) |
df['close'].ewm(span=n).mean() | EMA(CLOSE,N) |
| RSI | RSI(CLOSE,N) (returns 0-100) |
| MACD | MACD.DIF, MACD.DEA, MACD.MACD or manual: DIF:=EMA(CLOSE,12)-EMA(CLOSE,26); DEA:=EMA(DIF,9); MACD:=(DIF-DEA)*2; |
| Bollinger Bands | BOLL(N,M) → BOLL.UPPER, BOLL.MID, BOLL.LOWER or manual |
| ATR | ATR:=MA(MAX(MAX(HIGH-LOW,ABS(HIGH-REF(CLOSE,1))),ABS(LOW-REF(CLOSE,1))),N); |
df['close'].shift(n) | REF(CLOSE,N) |
df['high'].rolling(n).max() | HHV(HIGH,N) |
df['low'].rolling(n).min() | LLV(LOW,N) |
| crossover(fast, slow) | CROSS(FAST,SLOW) |
| crossunder(fast, slow) | CROSS(SLOW,FAST) |
df['volume'] | VOL |
abs(x) | ABS(X) |
max(a,b) | MAX(A,B) |
min(a,b) | MIN(A,B) |
| conditional | IF(COND,A,B) |
df['close'].pct_change(fill_method=None) | (CLOSE-REF(CLOSE,1))/REF(CLOSE,1) |
| count true in N bars | COUNT(COND,N) |
| sum over N bars | SUM(X,N) |
| std over N bars | STD(CLOSE,N) |
| slope / linear regression | SLOPE(CLOSE,N) |
:= for intermediate variables, : for output (plotted) lines{comment} — curly braces, NOT //;COLORRED, COLORGREEN, COLORYELLOW, COLORWHITE, COLORBLUE, COLORCYAN, COLORMAGENTALINETHICK2, POINTDOT, STICK, VOLSTICKDRAWTEXT(COND, PRICE, 'TEXT'), COLOR;DRAWICON(COND, PRICE, ICON_ID);| Feature | 通达信 | 同花顺 | 东方财富 |
|---|---|---|---|
| MACD built-in | MACD(12,26,9) | MACD(12,26,9) | same |
| Stochastic | KDJ(N,M1,M2) | same | same |
| Custom color | COLOR+RRGGBB | COLOR+RRGGBB | limited |
| Strategy backtest | 条件选股 only | 条件选股 only | 条件选股 only |
For maximum compatibility, avoid platform-specific extensions. Stick to core functions.
//+------------------------------------------------------------------+
//| Generated by Vibe-Trading |
//+------------------------------------------------------------------+
#property copyright "Vibe-Trading"
#property indicator_chart_window // or indicator_separate_window
#property indicator_buffers 2
#property indicator_plots 2
#property indicator_color1 clrDodgerBlue
#property indicator_color2 clrRed
input int InpPeriod = 14; // Period
double BuyBuffer[];
double SellBuffer[];
int OnInit()
{
SetIndexBuffer(0, BuyBuffer, INDICATOR_DATA);
SetIndexBuffer(1, SellBuffer, INDICATOR_DATA);
PlotIndexSetInteger(0, PLOT_ARROW, 233); // up arrow
PlotIndexSetInteger(1, PLOT_ARROW, 234); // down arrow
PlotIndexSetInteger(0, PLOT_DRAW_TYPE, DRAW_ARROW);
PlotIndexSetInteger(1, PLOT_DRAW_TYPE, DRAW_ARROW);
return(INIT_SUCCEEDED);
}
int OnCalculate(const int rates_total,
const int prev_calculated,
const datetime &time[],
const double &open[],
const double &high[],
const double &low[],
const double &close[],
const long &tick_volume[],
const long &volume[],
const int &spread[])
{
int start = MathMax(prev_calculated - 1, InpPeriod);
for(int i = start; i < rates_total; i++)
{
BuyBuffer[i] = EMPTY_VALUE;
SellBuffer[i] = EMPTY_VALUE;
// === YOUR LOGIC HERE ===
// Example: if(buyCondition) BuyBuffer[i] = low[i];
// if(sellCondition) SellBuffer[i] = high[i];
}
return(rates_total);
}| Python | MQL5 |
|---|---|
df['close'].rolling(n).mean() | iMA(_Symbol, PERIOD_CURRENT, n, 0, MODE_SMA, PRICE_CLOSE) or manual loop |
| EMA | iMA(..., MODE_EMA, ...) |
| RSI | iRSI(_Symbol, PERIOD_CURRENT, n, PRICE_CLOSE) |
| MACD | iMACD(_Symbol, PERIOD_CURRENT, 12, 26, 9, PRICE_CLOSE) |
| Bollinger | iBands(_Symbol, PERIOD_CURRENT, n, 0, mult, PRICE_CLOSE) |
| ATR | iATR(_Symbol, PERIOD_CURRENT, n) |
| Stochastic | iStochastic(_Symbol, PERIOD_CURRENT, K, D, slowing, MODE_SMA, STO_LOWHIGH) |
df['close'].shift(n) | close[i-n] (in OnCalculate loop) |
| crossover | buf[i] > ref[i] && buf[i-1] <= ref[i-1] |
iMA() etc. in OnInit(), use CopyBuffer() to get valuesArraySetAsSeries() to reverse.mq5), not Expert Advisor, to match "indicator export" purposeOnInit, read in OnCalculateWhen generating code, map Vibe-Trading instrument codes appropriately:
| Vibe-Trading | TradingView | 通达信/同花顺 | MT5 |
|---|---|---|---|
000001.SZ | SZSE:000001 | 000001 | N/A |
600519.SH | SSE:600519 | 600519 | N/A |
AAPL.US | NASDAQ:AAPL | N/A | AAPL |
BTC-USDT | BINANCE:BTCUSDT | N/A | BTCUSD |
Note: Most indicator code is instrument-agnostic — the user applies it to whatever chart they're viewing. Include a comment noting the original instrument for reference only.
When a Python strategy uses features that can't be directly translated, clearly note it:
| Python Feature | Platform Limitation |
|---|---|
| ML models (sklearn, etc.) | None — flag as "manual implementation required" |
| Custom pandas operations | TDX — limited to built-in functions |
| Multi-timeframe logic | TDX — no native MTF; Pine/MQL5 — supported |
| Dynamic position sizing | TDX — indicator only, no position control |
| External data (API calls) | All — indicators run offline on chart data only |
Always add a comment block at the top listing any features that could not be translated.
Before outputting:
//@version=6 is first line, no plot() in local scope, ternary on single lines:= for intermediate, : for output, {comments}EMPTY_VALUE for no-signal© HKUDS, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in agent/src/skills/pine-script of HKUDS/Vibe-Trading.
Open the folder on GitHubat commit 7f6908b
Strategy Export to Pine Script and More next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Strategy Export to Pine Script and More this skillHKUDS/Vibe-Trading | 35k | — | ~3.8k | Automated safety check: Pass | MIT | |
| TqSdk Trading and Datashinnytech/tqsdk-python | 5.1k | — | ~2k | Automated safety check: Pass | Apache-2.0 | |
| CCXT Crypto Exchange Library2025Emma/vibe-coding-cn | 23k | 2 repos | ~4.4k | Automated safety check: Pass | MIT | |
| Tushare Datazillionare/zillionare | 318 | 2 repos | ~2.3k | Automated safety check: Pass | None | |
| WorldQuant BRAIN Alpha ResearchQuantML-Research/wq-alpha-research | 405 | — | ~4.9k | Automated safety check: Pass | None | |
| Kalshi Traderyanfrigo/kalshi-ai-trading-bot | 612 | — | ~3.4k | Automated safety check: Pass | MIT |
shinnytech/tqsdk-python
Answers TqSdk Python questions on market data, accounts, orders, margin trials, simulation and backtesting, using the library's own docs and examples.
2025Emma/vibe-coding-cn
Reference help for the CCXT library covering crypto exchange APIs, market data, trading and order management across 150+ exchanges in JavaScript, Python and PHP.
zillionare/zillionare
面向中文自然语言的 Tushare 数据研究技能。用于把“看看这只股票最近怎么样”“帮我查财报趋势”“最近哪个板块最强”“北向资金在买什么”“给我导出一份行情数据”这类请求,转成可执行的数据获取、清洗、对比、筛选、导出与简要分析流程。适用于 A 股、指数、ETF/基金、财务、估值、资金流、公告新闻、板块概念与宏观数据等研究场景。
QuantML-Research/wq-alpha-research
Chinese-language playbook for WorldQuant BRAIN alphas: choose fields, write expressions, backtest, diagnose check failures, tune turnover, submit and build portfolios.
ryanfrigo/kalshi-ai-trading-bot
The disciplined process for autonomously and profitably trading the live Kalshi account on each /loop tick, with Claude as the decision-maker.
livetennisapi/livetennisapi-mcp
Build observe-only Polymarket and Kalshi tennis market tooling on the polymarket-tennis Python package (MIT) plus the Live Tennis API free tier.
HKUDS/Vibe-Trading
Index of Eastmoney's free, no-token market data interfaces for China A-shares and Hong Kong stocks: fund flows, dragon-tiger lists, margin trading, reports and news.
HKUDS/Vibe-Trading
Retrieves public OKX cryptocurrency market data such as spot prices, candlesticks, funding rates and open interest through the OKX V5 REST API, with no authentication.
HKUDS/Vibe-Trading
Fetches U.S. SEC EDGAR data: resolves tickers to CIK numbers, lists recent 10-K, 10-Q and 8-K filings with document URLs, and pulls XBRL financial series.
HKUDS/Vibe-Trading
Predicts whether a mainland China A-share company risks an ST or *ST warning after its next annual report, using financial thresholds and Sina penalty records.
HKUDS/Vibe-Trading
Breaks a structural trend such as AI infrastructure into its physical supply chain and ranks lesser-known listed companies sitting on each bottleneck.
HKUDS/Vibe-Trading
Plans and drafts an eight-part, roughly 120k-word investigative series on one company, built around a strict fact-check pass rather than fast drafting.
Works with
Categories
Translates a Python backtest strategy or a plain description into Pine Script v6, TDX formulas and MQL5 code for TradingView, Chinese broker terminals and MetaTrader 5. pine: Pine Script v6 for TradingView, TDX formula code for 通达信, 同花顺 and 东方财富, and MQL5 for MetaTrader 5.py for the strategy logic, translates the logic for each platform and saves the combined output.
Strategy Export to Pine Script and More fits situations like: moving a backtested Python strategy onto TradingView; getting TDX formula code for 通达信 or 同花顺 from a strategy; producing an MQL5 version of a strategy for MetaTrader 5; writing a Pine Script indicator from a plain description.
Run `npx skills add HKUDS/Vibe-Trading --skill pine-script -a claude-code`. Or copy the skill folder (agent/src/skills/pine-script in HKUDS/Vibe-Trading) into .claude/skills/pine-script in your project. Claude Code loads it when a task matches its description.
Run `npx skills add HKUDS/Vibe-Trading --skill pine-script -a codex`. Or copy the skill folder (agent/src/skills/pine-script in HKUDS/Vibe-Trading) into .agents/skills/pine-script in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add HKUDS/Vibe-Trading --skill pine-script -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/pine-script, .gemini/skills/pine-script, .github/skills/pine-script and .opencode/skills/pine-script in your project.
SKILL.md names no scripts, command-line tools or credentials: Strategy Export to Pine Script and More is instructions for the agent only. Our summary lists: A backtest run directory with config.json and code/signal_engine.py when exporting.
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Strategy Export to Pine Script and More is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 3.8k tokens (SKILL.md is roughly 15k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Strategy Export to Pine Script and More: TqSdk Trading and Data (shinnytech/tqsdk-python, 5.1k stars), CCXT Crypto Exchange Library (2025Emma/vibe-coding-cn, 23k stars), Tushare Data (zillionare/zillionare, 318 stars) and WorldQuant BRAIN Alpha Research (QuantML-Research/wq-alpha-research, 405 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
HKUDS (a GitHub organization) maintains it in HKUDS/Vibe-Trading, which has 34,884 GitHub stars. The repository holds 89 skills in this directory. The repository was last updated on October 6, 2026.
Source: HKUDS/Vibe-Trading on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.