Score interpretation:
- 0.7-1.0: High conviction entry
- 0.4-0.7: Wait for more confluence
- 0.0-0.4: No trade
Cost-effective routing: DeepSeek-V3 for pattern detection → Claude Sonnet for critical decisions
Quick Reference
| Methodology |
Purpose |
When to Use |
| Elliott Wave |
Wave position + targets |
Trend structure, cycle timing |
| Turtle Trading |
Breakout system |
Trend following |
| Fibonacci |
Support/resistance |
Entry/exit zones, golden pocket |
| Wyckoff |
Accumulation/distribution |
Institutional activity |
| Markov Regime |
Market state classification |
Position sizing, strategy selection |
| Pattern Recognition |
Candlestick + chart patterns |
Entry confirmation |
| Swarm Consensus |
Multi-LLM voting |
High-conviction decisions |
Confluence Detection
When methodologies agree = high-probability setup.
class ConfluenceAnalyzer:
"""Regime-weighted methodology fusion"""
REGIME_WEIGHTS = {
'trending_up': {'elliott': 0.30, 'turtle': 0.30, 'fib': 0.20, 'wyckoff': 0.15},
'trending_down': {'elliott': 0.30, 'turtle': 0.30, 'fib': 0.20, 'wyckoff': 0.15},
'ranging': {'fib': 0.35, 'wyckoff': 0.30, 'elliott': 0.20, 'turtle': 0.05},
'volatile': {'fib': 0.30, 'wyckoff': 0.30, 'elliott': 0.20, 'turtle': 0.10},
}
def analyze(self, df, regime: str) -> dict:
weights = self.REGIME_WEIGHTS[regime]
signals = self._collect_signals(df)
score = sum(s.strength * weights[s.method] for s in signals)
return {
'score': score, # 0-1.0
'action': 'BUY' if score >= 0.7 else 'WAIT',
'confluence': self._calc_agreement(signals)
}
Score Interpretation:
- 0.7-1.0: High conviction entry
- 0.4-0.7: Wait for more confluence
- 0.0-0.4: No trade
File Structure
trading-project/
├── methodologies/
│ ├── elliott_wave.py # Wave detection + halving cycle
│ ├── turtle_system.py # Donchian breakouts
│ ├── fibonacci.py # Levels + golden pocket
│ ├── wyckoff.py # Phase detection + VSA
│ └── markov_regime.py # State classification
├── patterns/
│ ├── candlestick.py # Engulfing, hammer, doji
│ └── chart_patterns.py # H&S, double bottom, triangles
├── aggregator.py # Regime-weighted fusion
└── swarm/
├── consensus.py # Multi-LLM voting
└── adapters/ # Claude, DeepSeek, Gemini
Cost-Effective Model Routing
| Task |
Model |
Cost |
| Pattern detection |
DeepSeek-V3 |
$0.27/1M |
| Confluence scoring |
Qwen-72B |
$0.40/1M |
| Critical decisions |
Claude Sonnet |
$3.00/1M |
| Swarm consensus |
Mixed tier |
~$1.50/1M avg |
Integration Notes
- Data Sources: yfinance, CCXT, Alpaca API
- Pairs with: runpod-deployment-skill (model serving)
- Projects: ThetaRoom, swaggy-stacks, alpha-lens
Reference Files
Core Methodologies:
reference/elliott-wave.md - Wave rules, halving supercycle, targets
reference/turtle-trading.md - Donchian channels, ATR sizing, pyramiding
reference/fibonacci.md - Levels, golden pocket, on-chain enhanced
reference/wyckoff.md - Phase state machines, VSA, composite operator
reference/markov-regime.md - 7-state model, transition probabilities
Advanced Patterns:
reference/pattern-recognition.md - Candlestick + chart patterns
reference/swarm-consensus.md - Multi-LLM voting system
reference/chinese-llm-stack.md - Cost-optimized Chinese LLMs for trading
1---2name: trading-signals3description: Technical analysis patterns - Elliott Wave, Wyckoff, Fibonacci, Markov Regime, and Turtle Trading with confluence detection. Use when analyzing charts, identifying trading signals, or calculating technical levels.4---5
6<objective>
7Provide standardized technical analysis patterns for trading projects, combining Elliott Wave, Wyckoff, Fibonacci, Markov Regime, and Turtle Trading methodologies. Enables confluence detection through regime-weighted methodology fusion and cost-effective multi-LLM consensus.
8</objective>
9
10<quick_start>
11**Confluence analysis (methodologies agree = high-probability setup):**
12```python
13score = sum(signal.strength * weights[signal.method] for signal in signals)
14action = 'BUY' if score >= 0.7 else 'WAIT'
15```
16
17**Score interpretation:**
18- 0.7-1.0: High conviction entry
19- 0.4-0.7: Wait for more confluence
20- 0.0-0.4: No trade
21
22**Cost-effective routing:** DeepSeek-V3 for pattern detection → Claude Sonnet for critical decisions
23</quick_start>
24
25<success_criteria>
26Analysis is successful when:
27- Multiple methodologies provide signals (not just one)
28- Regime identified (trending/ranging/volatile) before analysis
29- Confluence score calculated with regime-weighted methodology fusion
30- Cost-optimized: bulk processing on DeepSeek, critical decisions on Claude
31- Clear action (BUY/SELL/WAIT) with supporting rationale
32- NO OPENAI used in model routing
33</success_criteria>
34
35<core_patterns>
36Standardized patterns for technical analysis across trading projects.
37
38## Quick Reference
39
40| Methodology | Purpose | When to Use |
41|-------------|---------|-------------|
42| Elliott Wave | Wave position + targets | Trend structure, cycle timing |
43| Turtle Trading | Breakout system | Trend following |
44| Fibonacci | Support/resistance | Entry/exit zones, golden pocket |
45| Wyckoff | Accumulation/distribution | Institutional activity |
46| Markov Regime | Market state classification | Position sizing, strategy selection |
47| Pattern Recognition | Candlestick + chart patterns | Entry confirmation |
48| Swarm Consensus | Multi-LLM voting | High-conviction decisions |
49
50## Confluence Detection
51
52When methodologies agree = high-probability setup.
53
54```python
55class ConfluenceAnalyzer:
56 """Regime-weighted methodology fusion"""
57
58 REGIME_WEIGHTS = {
59 'trending_up': {'elliott': 0.30, 'turtle': 0.30, 'fib': 0.20, 'wyckoff': 0.15},
60 'trending_down': {'elliott': 0.30, 'turtle': 0.30, 'fib': 0.20, 'wyckoff': 0.15},
61 'ranging': {'fib': 0.35, 'wyckoff': 0.30, 'elliott': 0.20, 'turtle': 0.05},
62 'volatile': {'fib': 0.30, 'wyckoff': 0.30, 'elliott': 0.20, 'turtle': 0.10},
63 }
64
65 def analyze(self, df, regime: str) -> dict:
66 weights = self.REGIME_WEIGHTS[regime]
67 signals = self._collect_signals(df)
68
69 score = sum(s.strength * weights[s.method] for s in signals)
70 return {
71 'score': score, # 0-1.0
72 'action': 'BUY' if score >= 0.7 else 'WAIT',
73 'confluence': self._calc_agreement(signals)
74 }
75```
76
77**Score Interpretation:**
78- 0.7-1.0: High conviction entry
79- 0.4-0.7: Wait for more confluence
80- 0.0-0.4: No trade
81
82## File Structure
83
84```
85trading-project/
86├── methodologies/
87│ ├── elliott_wave.py # Wave detection + halving cycle
88│ ├── turtle_system.py # Donchian breakouts
89│ ├── fibonacci.py # Levels + golden pocket
90│ ├── wyckoff.py # Phase detection + VSA
91│ └── markov_regime.py # State classification
92├── patterns/
93│ ├── candlestick.py # Engulfing, hammer, doji
94│ └── chart_patterns.py # H&S, double bottom, triangles
95├── aggregator.py # Regime-weighted fusion
96└── swarm/
97 ├── consensus.py # Multi-LLM voting
98 └── adapters/ # Claude, DeepSeek, Gemini
99```
100
101## Cost-Effective Model Routing
102
103| Task | Model | Cost |
104|------|-------|------|
105| Pattern detection | DeepSeek-V3 | $0.27/1M |
106| Confluence scoring | Qwen-72B | $0.40/1M |
107| Critical decisions | Claude Sonnet | $3.00/1M |
108| Swarm consensus | Mixed tier | ~$1.50/1M avg |
109
110## Integration Notes
111
112- **Data Sources:** yfinance, CCXT, Alpaca API
113- **Pairs with:** runpod-deployment-skill (model serving)
114- **Projects:** ThetaRoom, swaggy-stacks, alpha-lens
115
116## Reference Files
117
118**Core Methodologies:**
119- `reference/elliott-wave.md` - Wave rules, halving supercycle, targets
120- `reference/turtle-trading.md` - Donchian channels, ATR sizing, pyramiding
121- `reference/fibonacci.md` - Levels, golden pocket, on-chain enhanced
122- `reference/wyckoff.md` - Phase state machines, VSA, composite operator
123- `reference/markov-regime.md` - 7-state model, transition probabilities
124
125**Advanced Patterns:**
126- `reference/pattern-recognition.md` - Candlestick + chart patterns
127- `reference/swarm-consensus.md` - Multi-LLM voting system
128- `reference/chinese-llm-stack.md` - Cost-optimized Chinese LLMs for trading