orderflow-analysis
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseOrderflow Analysis Skill
订单流分析Skill
Detects institutional trading patterns from Level 2 market data and trade executions.
从Level 2市场数据和交易执行记录中检测机构交易模式。
Capabilities
功能特性
This skill enables the agent to:
- Analyze L2 orderbook depth for bid/ask walls
- Detect absorption patterns (hidden liquidity)
- Detect exhaustion at support/resistance
- Identify imbalance sweeps
- Generate trade signals with confidence levels
该Skill使Agent能够:
- 分析L2订单簿深度,识别买卖盘挂单墙
- 检测吸收模式(隐藏流动性)
- 检测支撑/阻力位的耗尽信号
- 识别失衡扫单
- 生成带置信度的交易信号
Prerequisites
前置条件
- Active L2 data connection (Alpaca Pro or Polygon)
- Trading symbols configured in watchlist
- 活跃的L2数据连接(Alpaca Pro或Polygon)
- 观察列表中已配置交易标的
Procedural Steps
操作步骤
1. Connect to L2 Data Stream
1. 连接L2数据流
Use the trading-orderflow MCP server to establish WebSocket connection.
Call: connect_l2_stream(symbol: str, provider: "alpaca" | "polygon")使用trading-orderflow MCP服务器建立WebSocket连接。
调用:connect_l2_stream(symbol: str, provider: "alpaca" | "polygon")2. Monitor Orderbook State
2. 监控订单簿状态
Track bid/ask walls and imbalance ratios.
Call: get_orderbook_state(symbol: str) -> returns current book snapshot追踪买卖盘挂单墙和失衡比率。
调用:get_orderbook_state(symbol: str) -> 返回当前订单簿快照3. Run Detection Algorithms
3. 运行检测算法
When sufficient data is collected:
Call: analyze_footprint(symbol: str, window_seconds: int)
Returns: List[FootprintSignal] with pattern type, direction, confidence收集到足够数据后:
调用:analyze_footprint(symbol: str, window_seconds: int)
返回:包含模式类型、方向、置信度的List[FootprintSignal]4. Interpret Signals
4. 解读信号
| Signal Type | Description | Suggested Action |
|---|---|---|
| ABSORPTION | Heavy volume absorbed without price movement | Fade the volume direction |
| EXHAUSTION | Declining volume at S/R | Prepare for reversal |
| IMBALANCE | 3:1+ buy/sell ratio | Follow imbalance direction |
| SWEEP | Multiple levels cleared rapidly | Momentum follow |
| 信号类型 | 描述 | 建议操作 |
|---|---|---|
| ABSORPTION | 大量成交量被吸收但价格未发生变动 | 反向操作当前成交量方向 |
| EXHAUSTION | 支撑/阻力位成交量递减 | 准备应对趋势反转 |
| IMBALANCE | 买卖比率达到3:1及以上 | 跟随失衡方向操作 |
| SWEEP | 多个价位被快速突破 | 跟随动量操作 |
5. Forward to Confirmation Mesh
5. 提交至确认网格
All signals must pass through confirmation mesh before execution:
Call: validate_signal(signal: FootprintSignal, quantity: float) -> ConfirmationResult所有信号在执行前必须通过确认网格验证:
调用:validate_signal(signal: FootprintSignal, quantity: float) -> ConfirmationResultSafety Guardrails
安全防护规则
- Never execute trades based on LOW confidence signals
- Require L2 liquidity verification before market orders
- All executions must go through confirmation_mesh validation
- Circuit breakers halt trading after consecutive failures
- 绝不要基于低置信度信号执行交易
- 市价单执行前需验证L2流动性
- 所有交易执行必须经过confirmation_mesh验证
- 连续失败后触发断路器停止交易
Example Workflow
示例工作流
python
undefinedpython
undefinedAgent detects high-confidence absorption
Agent检测到高置信度吸收信号
signal = await analyze_footprint("AAPL", window_seconds=60)
if signal.signal_type == "ABSORPTION" and signal.confidence == "HIGH":
# Validate before execution
result = await validate_signal(signal, quantity=100)
if result.approved:
# Proceed to execute-trade skill
await execute_confirmed_trade(result)undefinedsignal = await analyze_footprint("AAPL", window_seconds=60)
if signal.signal_type == "ABSORPTION" and signal.confidence == "HIGH":
# 执行前验证
result = await validate_signal(signal, quantity=100)
if result.approved:
# 调用execute-trade Skill执行交易
await execute_confirmed_trade(result)undefined