AP

axisju/price-action-skills

Developer tools
22ย stars Quality 44 Trend 31

๐Ÿ“ˆ An AI-powered trading setup detection toolkit based on Al Brooks Price Action methodology. Auto-detects market cycles (Spike/Channel/TR), swing pivots, S/R zones, and pullback triggers...

Overview

Price Action Skills is a professional market structure analysis and trading setup detection toolkit designed for AI coding assistants (like Claude Code, Cursor, and Antigravity). It bridges the gap between programmatic quantitative calculations and qualitative chart analysis, automatically scanning A-Share and global market K-line charts using . - ๐Ÿ“ˆ : Programmatically detects whether a stock is in a Spike (Strong Trend), Channel (Tight/Broad), or Trading Range (TR). - ๐ŸŽฏ : Automatically identifies H1/H2 (High 1/2) bullish setups in uptrend pullbacks, and L1/L2 (Low 1/2) bearish setups in downtrends. - ๐Ÿ“ : Maps swing highs and swing lows to construct channels and trace horizontal support/resistance levels. - ๐Ÿ“ : Identifies bearish wedge tops and bullish wedge bottoms (3-push structures) to forecast trend reversals. - ๐Ÿ“Š : Renders K-line charts highlighting EMAs, Swing Points, Support/Resistance zones, and H1/H2/L1/L2 trading triggers. - Python 3.

README

Price Action Skills โ€” AI-Powered Brooks Price Action Analyzer

Price Action Skills is a professional market structure analysis and trading setup detection toolkit designed for AI coding assistants (like Claude Code, Cursor, and Antigravity).

It bridges the gap between programmatic quantitative calculations and qualitative chart analysis, automatically scanning A-Share and global market K-line charts using Al Brooksโ€™ classic Price Action (PA) methodology.

Key Features

  • ๐Ÿ“ˆ Market Cycle Classification: Programmatically detects whether a stock is in a Spike (Strong Trend), Channel (Tight/Broad), or Trading Range (TR).
  • ๐ŸŽฏ Brooks Pullback Setup Counting: Automatically identifies H1/H2 (High 1/2) bullish setups in uptrend pullbacks, and L1/L2 (Low 1/2) bearish setups in downtrends.
  • ๐Ÿ“ Swing Pivot & Support/Resistance Detection: Maps swing highs and swing lows to construct channels and trace horizontal support/resistance levels.
  • ๐Ÿ“ Wedge Pattern Detection: Identifies bearish wedge tops and bullish wedge bottoms (3-push structures) to forecast trend reversals.
  • ๐Ÿ“Š Auto-Annotated Visualization: Renders K-line charts highlighting EMAs, Swing Points, Support/Resistance zones, and H1/H2/L1/L2 trading triggers.

Repository Layout

price-action-skills/
โ”œโ”€โ”€ SKILL.md                 # System prompt & skill configuration for AI agents
โ”œโ”€โ”€ README.md                # Project documentation (this file)
โ”œโ”€โ”€ scripts/
โ”‚   โ”œโ”€โ”€ pa_analyzer.py       # Core Python logic for Price Action calculation
โ”‚   โ””โ”€โ”€ chart_plotter.py     # Annotation and chart rendering engine
โ”œโ”€โ”€ references/
โ”‚   โ””โ”€โ”€ al_brooks_cheat_sheet.md # Al Brooks terminology and reference guide
โ””โ”€โ”€ tests/                   # Test suite for indicators and algorithms

Getting Started

1. Requirements

  • Python 3.10+
  • Dependencies: pandas, numpy, matplotlib, requests, loguru (Optionally yfinance / akshare for live market data)
pip install pandas numpy matplotlib requests loguru yfinance

2. Run Analysis

You can execute the analyzer script directly to output a structured JSON report:

python scripts/pa_analyzer.py --ticker 601899 --start-date 20251001 --end-date 20260625 --output scratch/pa_601899.json

Arguments:

  • --ticker: The 6-digit stock code (e.g. 601899 for Zijin Mining, 000001 for Ping An Bank) or US tickers (e.g. AAPL, GLD, QQQ).
  • --output: Path to save the extracted setups and market structures (JSON).

3. Generate Annotated Charts

Once you have the analysis output, pass it to the plotter:

python scripts/chart_plotter.py --data scratch/pa_601899.json --output scratch/chart_601899.png

This produces a publication-quality chart mapping the identified Price Action setups on top of the candlestick chart.


Integrating with AI Agents (Antigravity / Claude Code)

Copy this directory into your AI Customization folder (e.g., .agents/skills/price-action-skills).

When you ask your agent to analyze a stock, it will trigger the skill, run pa_analyzer.py, look up the cheat sheet in references/, and compile a highly disciplined Al Brooks style report:

You: ๅˆ†ๆžไธ€ไธ‹็ดซ้‡‘็ŸฟไธšไปŠๅคฉ็š„่ตฐๅŠฟ and ไบคๆ˜“ๆœบไผš

Claude/Antigravity: [Triggering price-action-skills]
  -> Running pa_analyzer.py for 601899...
  -> Loaded al_brooks_cheat_sheet.md...
  -> Detected: Trading Range, Wedge Bottom at 26.10, H2 Buy Trigger...
  -> [Outputs report with Brooks context and chart recommendations]

Disclaimer

This repository is for educational and research purposes only. It is not financial, investment, tax, or legal advice. All trade setups and market analyses generated by this tool are based on historical data and do not guarantee future results. Practice strict risk management and position sizing.

๐Ÿค Acknowledgments

This project was built and accelerated using Gemini 3.5 Flash integrated with the Antigravity autonomous AI development environment by Google DeepMind.


License

This project is licensed under the MIT License - see the LICENSE file for details.

View the full README on GitHub

Recommended Tools

Try a different keyword or remove a filter.

Install

npx skillfish add axisju/price-action-skills
New to MCP? Start with the mcpskill.org guide โ†’