๐ 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(Optionallyyfinance/aksharefor 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.601899for Zijin Mining,000001for 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.
Recommended Tools
Try a different keyword or remove a filter.
Install
npx skillfish add axisju/price-action-skills