Guide · Agent skill
How to use the Pine Script & TDX Strategy Exporter agent skill
Updated · written with AI from the project's own documentation and checked against our catalogue data
The pine-script skill is a set of instructions that lets an AI agent take a trading strategy and rewrite it as indicator or strategy code for TradingView, China's TDX-style platforms (通达信, 同花顺, 东方财富) and MetaTrader 5. It is aimed at quant developers moving a Python backtest onto a charting platform, and at traders who need TDX formulas. After this guide you will know how to install the skill, ask for an export in plain language, and review what the agent produces before you use it.
Quick start
- 1Download the ZIP. Download the pine-script skill ZIP from this page.
- 2Unzip into a skills folder. Unzip it into ~/.claude/skills/ or into the project's .claude/skills/ folder. Alternatively, upload it in the Claude apps under Settings → Capabilities → Skills.
- 3Prepare your run directory. If exporting a backtest, make sure the run directory contains config.json and code/signal_engine.py.
- 4Ask for the export. Describe the export in plain language, naming the run or the strategy and the platforms you need.
- 5Open artifacts/strategy.pine. Find the combined output in the run directory. Each platform section has a header with paste instructions.
- 6Paste into each platform. Copy the TradingView block into the Pine Editor, the TDX block into the formula manager, and the MQL5 block into a .mq5 file for MetaEditor.
- 7Review and test. Compare the code with your original logic and test it on historical data before any real use.
What the skill makes the agent do
The skill teaches an agent to translate a strategy into code for several platforms in one pass. It can start from a strategy that Vibe-Trading has backtested, or from a description you write in plain language.
Supported targets are TradingView (Pine Script), the TDX formula language used by 通达信, 同花顺 and 东方财富, and MQL5 for MetaTrader 5. All outputs are saved together in one file, with notes on where to paste each block.
The skill only writes text. It does not run trades, does not connect to any trading platform, and does not run scripts.
- TradingView: Pine Script code for the Pine Editor
- 通达信 / 同花顺 / 东方财富: one TDX formula that works on all three
- MetaTrader 5: MQL5 code to save as a .mq5 file and compile in MetaEditor
Install the pine-script skill
Download the ZIP file from this page. Unzip it so that the skill folder, which contains SKILL.md, sits in one of these locations: ~/.claude/skills/ for all your projects, or .claude/skills/ inside a single project folder.
If you use the Claude apps instead, open Settings, go to Capabilities, then Skills, and upload the skill there.
- Personal install: unzip into ~/.claude/skills/
- Project install: unzip into the project's .claude/skills/ folder
- Claude apps: Settings → Capabilities → Skills → upload
What you need before you run an export
For an export from a backtest, you need a Vibe-Trading run directory that contains config.json and code/signal_engine.py. The agent reads config.json for instruments, dates and parameters, and reads signal_engine.py for the strategy logic.
You also need the destination tools: the TradingView Pine Editor, the TDX / 同花顺 / 东方财富 formula manager, and MetaEditor for MT5. The skill does not install or open these for you.
If you only have a description, you do not need a run directory. The agent writes the code from your description.
- Export from backtest: run directory with config.json and code/signal_engine.py
- Export from description: a written description of the indicator or strategy
- Destinations: TradingView Pine Editor, 公式管理器 in TDX-style software, MetaEditor
Trigger the skill with a natural request
Ask the agent in plain language and name the strategy or the run. The agent loads the skill itself when it sees a request to export a strategy to trading platform code. The skill's own workflow begins with loading this guide.
The agent follows a fixed sequence. For a backtest export it reads config.json, reads code/signal_engine.py, translates the logic to every platform, and writes artifacts/strategy.pine inside the run directory. It then returns the code with usage instructions for each platform.
- "Export this backtest run to TradingView and TDX formulas."
- "Turn my RSI and moving average crossover strategy into MT5 code."
- "Write indicator code for all platforms from this description: buy when the fast MA crosses above the slow MA and RSI is below 40."
Read the output file
Every export goes to artifacts/strategy.pine in the run directory. Despite the .pine extension, the file holds the code for all platforms, separated by headers. Each header says where to paste that section.
TradingView code goes into the Pine Editor as a new blank indicator, then Add to Chart. TDX code goes into 功能 → 公式管理器 → 新建指标公式. MQL5 code is saved as a .mq5 file, compiled in MetaEditor, then attached to a chart from the Navigator.
- TradingView: Pine Editor → New blank indicator → Add to Chart
- TDX: 功能 → 公式管理器 → 新建指标公式
- MT5: save as .mq5 → MetaEditor → Compile → Navigator → Attach to Chart
================================================================================
TRADINGVIEW — Pine Script v6
Paste into: Pine Editor → New blank indicator → Add to Chart
================================================================================Check the translated code before you use it
The output is a translation of logic, not a tested or validated trading system. The skill's own guidance says translated formulas can contain errors or differ subtly from the original Python. Backtest results may not carry over to live markets.
Review each block. Compare the entry and exit conditions with your Python code, check the parameters, and test on the platform's chart and replay before any real use.
- Compare signal conditions line by line with signal_engine.py
- Confirm that indicator periods and parameters match config.json
- Watch for repainting and version rules the platform enforces
- Test on historical data and paper trading first
Safety notes: scripts and network
This skill runs no scripts and uses no network connection, according to its listing. Its only action is reading the files in your run directory and writing artifacts/strategy.pine.
Because the skill writes code that you may paste into live trading tools, treat the output like any code you did not write yourself. Do not run it against a real account until you have reviewed it.
- Runs scripts: no
- Uses network: no
- Writes: artifacts/strategy.pine inside the run directory
What people use it for
- Moving a Python backtest with moving averages or RSI onto a TradingView chart as an indicator or strategy
- Giving a China-market trader a TDX formula that works across 通达信, 同花顺 and 东方财富
- Creating an MT5 starting template from a written description of an indicator, which you then compile and review
- Comparing the same strategy logic across TradingView and TDX formats side by side in one file
Frequently asked questions
How do I install the pine-script agent skill?
Download the ZIP from this page and unzip it into ~/.claude/skills/ for personal use, or into a project's .claude/skills/ folder. In the Claude apps, you can instead upload it under Settings → Capabilities → Skills.
Is the pine-script skill free to use?
The skill is published under the MIT licence, as stated on this page. Check the licence file in the source repository for the full terms.
What do I need to run it?
For a backtest export you need a Vibe-Trading run directory with config.json and code/signal_engine.py. You also need the target tool, such as the TradingView Pine Editor, a TDX-style formula manager, or MetaEditor for MT5.
Does the skill place trades or connect to my broker or platform?
No. According to its description, the skill only writes text files. It does not run trades and does not connect to any trading platform.
Will the generated code be profitable or safe to trade live?
The skill does not claim that. Its output is a translation of your strategy logic, which may contain errors or differ from the Python original. Test it thoroughly before any live use.
How does it compare with other ways of converting strategies to Pine Script or TDX?
This page does not compare the skill with other tools. Its stated scope is exporting Vibe-Trading strategies, or strategies described in plain language, to TradingView, TDX-style, and MT5 code in one file.
New agent skills, repos and AI tools — every week
The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.
Our verdict
Use this skill if you build strategies in Python with Vibe-Trading and want a starting point for TradingView, MT5 or TDX formula code, and you can read and test code yourself. Pick another route if you need code that is already validated, if you cannot review translated formulas, or if your work is outside financial indicators and strategies.
Download the skill