TDX Formula Programming Assistant
Paste the following prompt into your AI chat to install this skill:
Please follow https://skillhub.cn/install/skillhub.md to install @user_b009b942/tdx-formula-assistant.
About this skill
Problem Statement
TDX formulas often fail because of full-width punctuation, missing semicolons, or confusion between output and intermediate assignment. Stock-selection formulas may emit too many outputs, while future functions can inflate backtest results. Beginners also lack a reliable mapping from natural-language trading conditions to TDX functions and templates.
How It Works
This skill guides the workflow for TDX formula development. It first clarifies the formula type, signal logic, timeframe, and filters, then selects functions by need: moving averages and trend logic with MA, EMA, and CROSS; volume-price logic with VOL and AMOUNT; chip distribution with COST and WINNER; or stock filters with INBLOCK and NAMELIKE. It then generates formulas while distinguishing : for plotted outputs from := for intermediate variables, ensures statements end with ASCII semicolons, and enforces a single 0/1 output for selection formulas. For indicator formulas, it can add visual attributes such as COLORRED, LINETHICK2, and DOTLINE, and includes checks for punctuation, bracket pairing, variable conflicts, and future-function risk.
Scope and Caveats
It is suitable for technical indicators, conditional stock selection, trading systems, and colored K-line formulas, as well as explaining or refactoring existing code. Be aware that chip functions may depend on daily data and professional datasets, index or finance functions may require downloaded data, and future functions such as BACKSET, ZIG, or XMA should be used cautiously in selection logic.
Use Cases
- Draft a TDX stock-selection formula for moving-average golden cross plus volume expansion, ensuring one 0/1 output.
- Refactor an indicator formula so intermediate variables use `:=` and only the final plotted lines use `:`.
- Translate an RSI oversold rebound rule into TDX code with ASCII semicolons and explanatory comments.
- Debug a selection formula for Chinese punctuation, future functions, and missing index or financial data dependencies.
Best For
- Quant strategy users who want to turn golden cross, volume breakout, or trend rules into runnable stock-selection formulas.
- TDX formula maintainers who need to explain legacy code, fix output assignment, and remove full-width punctuation errors.
- Individual investors who want to express RSI, MACD, or chip distribution ideas as sub-chart indicators or screening formulas.
- Research analysts who need to add board, ST, or financial-data filters to existing TDX formulas.
Related Skills
A systematic code error fixing skill that follows a five-step workflow: Reproduce, Isolate, Understand, Fix, Verify, to help developers resolve code errors.
Supports inline SVG/HTML rendering and Mermaid code output, covering common technical diagram creation like architecture and flow diagrams.
Publish HTML, static assets, or build output as a public link, with account management, update, deletion, and AI safety review.
A comprehensive browser automation guide covering navigation, interaction, multi-tab management, and data collection, tailored for domestic web ecosystems and tools like Playwright/Selenium.