TradeBlazer TB Quant Strategy Assistant
Paste the following prompt into your AI chat to install this skill:
Please install @user_6908068e/tb-quant according to https://skillhub.cn/install/skillhub.md.
About this skill
Problem
TB/TradeBlazer strategy work can stall on platform syntax and workflow: OnBar signatures, Vars scope, series variables, order functions, array indexing, multi-symbol handling, and backtest constraints. This skill turns a Chinese trading idea into a complete .tc4 strategy file and provides a path to load, compile, and run it in the TB terminal, reducing friction from idea to executable code.
How It Works
- Confirm strategy inputs first: instrument pool, frequency, entry/exit rules, position sizing, stop loss/take profit, backtest window, initial capital, and execution mode; vague ideas trigger follow-up questions.
- Generate TB-compliant code: use
void OnBar(Arrayref Indexs),Vars NumericSeries, and onlyBuy/Sell/BuyToCover/SellShortfor orders, with built-ins such asMarketPosition,EntryPrice, andBarsSinceEntry. - Provide a local workflow: paste the code into Strategy Lab, compile it, set backtest parameters, run it, and inspect equity curve, drawdown, and Sharpe ratio; live trading requires real-time quotes and specific contracts.
Boundaries
- Targets TB/TBQuant
.tc4strategies, not generic Python backtesting frameworks. - Watch
T+1, live quote limits for continuous contracts, and same-day backtest restrictions before 18:30. - TB has no built-in stop loss/take profit functions, so the strategy must compute exits and call order functions.
Use Cases
- Turn a dual-MA, breakout, or indicator idea into a compilable .tc4 strategy and run a TB backtest.
- Confirm instruments, frequency, entry/exit rules, and position size, then complete TB syntax and backtest parameters.
- Debug common syntax issues such as OnBar signatures, Vars series variables, and Buy/Sell close-out calls.
- Write backtest logic for continuous or specific contracts while checking T+1 and live-quote limitations.
Best For
- Trading engineers building TB futures or equity quant strategies who need Chinese ideas converted into .tc4 code.
- Individual developers validating MA, breakout, or indicator signals by generating backtestable strategies and checking syntax.
- Strategy researchers debugging local runs who need to check TB constraints such as OnBar, Vars, and Buy/Sell calls.
- Business users testing continuous or specific contract backtests who need to handle T+1 and quote-push limits.
Related Skills
Analyzes code to extract control and data flow, then outputs Markdown with Mermaid source and high-resolution PNG diagrams.
For development and programming scenarios around VSCode and TypeScript IDE.
A TypeScript-oriented Windmill Wrap development reference.
A Python-based Selenium wrapper for engineering browser automation workflows.