AI Agent Hub
Back to skills
Chan Theory Buy/Sell Signals icon

Chan Theory Buy/Sell Signals

Professional Updated 2026.08.30

Paste the following prompt into your AI chat to install this skill:

Please follow https://skillhub.cn/install/skillhub.md to install @user_401a054b/chan-signal.

About this skill

Problem

When judging A-share moves, price action or single moving-average cues can be misleading, especially in ranges that look like reversals but end as noise. This skill applies the Chan trend framework to turn raw K-line data into a repeatable analysis chain: K-line inclusion, fractal detection, stroke division, pivot identification, and MACD divergence detection. It then classifies signals into first, second, and third buy/sell points, with confidence-aware trading references.

Workflow and Limits

The main entry point is scripts/chan_signal.py, which fetches public TDX K-line data through pytdx and supports daily, weekly, 60-minute, and 30-minute periods. The script computes Chan structure first and returns JSON. A higher-level response can combine latest price, change, current trend, price position relative to the pivot, signal rank, and confidence to form a recommendation. In multi-period use, larger periods are better for direction, while shorter periods help locate entries and exits.

Limits matter: market data comes from public quotes and may reflect the latest close outside trading hours. Default parameters such as minimum stroke length and pivot tolerance may need review in extreme conditions. The simplified segment algorithm and MACD-based divergence can produce false signals in choppy markets. Outputs should retain risk disclaimers and should not be treated as direct buy/sell orders.

Use Cases

  • {'en': 'Analyze one A-share stock and identify daily-level first, second, or third buy signals.'}
  • {'en': 'Run weekly and 60-minute data for the same stock to infer the larger trend direction.'}
  • {'en': 'Turn the JSON output into a trading reference with pivot position and risk notes.'}
  • {'en': 'Review MACD divergence results in choppy markets and flag likely false buy/sell signals.'}

Best For

  • {'en': 'A-share retail investors who want to encode Chan buy/sell point rules into scripts.'}
  • {'en': 'Python data tinkerers who need to parse K-lines, strokes, and pivot signals.'}
  • {'en': 'Quant researchers who want to reuse MACD divergence and multi-period checks.'}
  • {'en': 'Engineers writing trading notes who need structured signals plus risk disclaimers.'}