ElliottWaveFacade— indicator-style, per-bar access. Use this in strategy rules and chart overlays when you want live signals at each bar index.ElliottWaveAnalysisRunner— one-shot analysis pipeline. Use this when you need a complete snapshot: multi-degree scenario ranking, confidence breakdowns, and cross-degree compatibility scores.
ElliottWaveFacade
ElliottWaveFacade wires the full indicator stack from a single configuration and exposes each indicator as a lazily-created getter. All indicators share the same underlying swing detector, so they always analyse the same wave structure.
Creating a facade
- Fractal swing detection
- ZigZag swing detection
- Asymmetric fractal
- Custom swing indicator
Quickstart (from the README)
Available indicators
Each indicator is created lazily on first access.| Getter | Return type | What it gives you |
|---|---|---|
facade.phase() | ElliottPhaseIndicator | Current wave phase as ElliottPhase |
facade.ratio() | ElliottRatioIndicator | Fibonacci ratio between adjacent swings |
facade.channel() | ElliottChannelIndicator | Upper, lower, and median trend channel |
facade.waveCount() | ElliottWaveCountIndicator | Raw swing count |
facade.filteredWaveCount() | ElliottWaveCountIndicator | Swing count after noise compression |
facade.confluence() | ElliottConfluenceIndicator | Confluence score across ratio + channel signals |
facade.invalidation() | ElliottInvalidationIndicator | Boolean invalidation flag |
facade.invalidationLevel() | ElliottInvalidationLevelIndicator | Numeric invalidation price level |
facade.scenarios() | ElliottScenarioIndicator | Ranked alternative wave interpretations |
facade.projection() | ElliottProjectionIndicator | Fibonacci-based price targets |
facade.trendBias() | ElliottTrendBiasIndicator | Directional bias derived from scenarios |
Convenience methods on the facade
Scenario modes for invalidation levels
ElliottInvalidationLevelIndicator supports three modes through ElliottScenarioIndicator:
- PRIMARY — invalidation price from the top-ranked scenario only.
- CONSERVATIVE — tightest (closest) invalidation across all high-confidence scenarios.
- AGGRESSIVE — widest (farthest) invalidation across all scenarios.
Custom Fibonacci tolerance and swing compression
ElliottDegree
ElliottDegree labels the expected time scale of your swings. Use it to keep indicator configurations consistent with the bar resolution of your series.
All ElliottDegree values
All ElliottDegree values
| Value | Typical time horizon | Recommended bar type |
|---|---|---|
GRAND_SUPERCYCLE | Multi-decade to century | Monthly/weekly |
SUPER_CYCLE | Decades | Weekly |
CYCLE | Years | Weekly/daily |
PRIMARY | Months to years | Daily (400–1 000 bars) |
INTERMEDIATE | Weeks to months | Daily (180–400 bars) |
MINOR | Days to weeks | Daily/hourly |
MINUTE | Hours to days | Daily/hourly |
MINUETTE | Minutes to hours | Minute/hourly |
SUB_MINUETTE | Minutes and below | Minute |
ElliottDegree can suggest appropriate degrees for your data at runtime:
ElliottPhase
ElliottPhase identifies which leg of the wave structure the market is currently in.
Impulse phases: WAVE1, WAVE2, WAVE3, WAVE4, WAVE5
Corrective phases: CORRECTIVE_A, CORRECTIVE_B, CORRECTIVE_C
Special value: NONE — no qualifying swing structure detected yet.
ElliottWaveAnalysisRunner
ElliottWaveAnalysisRunner runs a complete one-shot analysis pipeline. It optionally validates scenarios across neighboring degrees and re-ranks them using cross-degree compatibility.
Builder options
All builder options
All builder options
| Method | Default | Description |
|---|---|---|
.degree(ElliottDegree) | required | Base degree that drives scenario ranking |
.higherDegrees(int) | 1 | Number of higher degrees to include (0 to disable) |
.lowerDegrees(int) | 1 | Number of lower degrees to include (0 to disable) |
.baseConfidenceWeight(double) | 0.7 | Weight in [0.0, 1.0] for base confidence vs. cross-degree score |
.minConfidence(double) | 0.15 | Minimum confidence threshold for scenario inclusion |
.maxScenarios(int) | library default | Maximum number of scenarios to retain |
.scenarioSwingWindow(int) | 5 | Swings passed to scenario generation (0 = all) |
.swingDetector(SwingDetector) | adaptive ZigZag (ATR 14) | Override the swing detector |
.swingFilter(SwingFilter) | auto-scaled by degree | Override the swing filter |
.confidenceModel(ConfidenceModel) | ConfidenceProfiles.defaultModel() | Override the confidence scorer |
.patternSet(PatternSet) | PatternSet.all() | Restrict which pattern types are generated |
.seriesSelector(SeriesSelector) | trims to max history per degree | Override how series are sliced per degree |
.analysisRunner(AnalysisRunner) | built-in pipeline | Override the entire per-degree pipeline |
The confidence scorer weights five factors: Fibonacci proximity (35%), time proportions (20%), alternation quality (15%), channel adherence (15%), and structure completeness (15%). Pass a custom
ConfidenceModel via .confidenceModel(...) to change these weights.Example classes
All examples are in theta4j-examples module under ta4jexamples.analysis.elliottwave.
| Class | What it demonstrates |
|---|---|
ElliottWaveIndicatorSuiteDemo | Full indicator suite — swings, phases, Fibonacci, channels, confidence, scenarios, charts. Defaults to an ossified dataset; supports YahooFinance or Coinbase via command-line arguments. |
ElliottWavePresetDemo | Consolidated launcher for preset ossified assets (btc, eth, sp500) and live mode with any ticker. |
ElliottWaveAdaptiveSwingAnalysis | Adaptive/composite swing detection for scenario generation. |
ElliottWavePatternProfileDemo | Comparison of default and pattern-aware confidence profiles. |
ElliottWaveMultiDegreeAnalysisDemo | Cross-degree validation and scenario recommendation. |
ElliottWaveTrendBacktest | Trend-bias directionality over backtest and walk-forward windows. |
HighRewardElliottWaveBacktest | High-reward Elliott Wave strategy presets. |