chan-theory-analysis

Generate Chan theory buy and sell signals from OHLCV data.

Updated Apr 14, 2026
One-click install
npx skills add https://github.com/loanntc/Paave --skill chan-theory-analysis
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: chan-theory-analysis
Source: https://github.com/loanntc/Paave/tree/main/skills/chanlun
Command: npx skills add https://github.com/loanntc/Paave --skill chan-theory-analysis

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires czsc, requests, pandas, and includes references (resource) components.

What problem does it solve?

It solves the problem of converting raw OHLCV price data into actionable Chan theory trading signals by detecting patterns (fractals), strokes, and consolidation zones automatically.

Core Features & Use Cases

  • Chan structure detection: Automatically identifies分型 (fractals), 笔 (strokes), and 中枢 (consolidation zones) from ordered K-lines.
  • Buy/Sell signal generation: Produces 一买/一卖, 二买/二卖, and 三买/三卖 signals (including multi-stroke pattern classifications like 3/5/7/9/11 strokes) and maps them to 1 (long) / -1 (short) / 0 (wait).
  • Multi-frequency workflow: Works across different K-line frequencies by configuring Freq in czsc, supporting use in backtesting and real-time monitoring pipelines.
  • Use Case: Scan BTC daily candles to mark historical turning points and evaluate strategy behavior without manually labeling fractals and strokes.

Quick Start

Provide a time-sorted OHLCV DataFrame (open/high/low/close/volume/amount) and run the signal engine to output a per-timestamp Series of 1 (buy), -1 (sell), or 0 (no signal).

Frequently Asked Questions about chan-theory-analysis

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate Chan theory buy and sell signals from OHLCV data?

Chan theory buy and sell signals are generated by detecting fractals, strokes, and consolidation zones from ordered OHLCV K-lines. The engine maps multi-stroke patterns into standardized outputs of 1 for long, -1 for short, and 0 for watch.

What are fractals and strokes in Chan theory time-series analysis?

In Chan theory time-series analysis, fractals and strokes are structural components automatically identified from K-line price bars. Fractals mark turning points, strokes connect them, and consolidation zones form the basis for generating buy and sell trading signals.

Can I use czsc for multi-frequency backtesting with Chan theory signals?

Yes, you can use czsc for multi-frequency backtesting by configuring the Freq parameter. This allows you to scan historical turning points and evaluate strategy behavior across different K-line frequencies for stocks, crypto, or futures.

Does the Chan theory signal engine work with crypto and futures data?

Yes, the Chan theory signal engine works with crypto and futures data. By processing ordered OHLCV bar inputs through DataFrame-to-RawBar conversion, it supports backtesting and screening workflows across various asset classes.

How do I convert a pandas DataFrame to RawBar for incremental signal updates?

To convert a pandas DataFrame to RawBar for incremental signal updates, you use the specified czsc signal functions and RawBar conversion utilities. This processes time-series OHLCV data to continuously map detected patterns into 1, -1, or 0 outputs.