SmarterSystems.ElliottWavesEngine
1.1.0
dotnet add package SmarterSystems.ElliottWavesEngine --version 1.1.0
NuGet\Install-Package SmarterSystems.ElliottWavesEngine -Version 1.1.0
<PackageReference Include="SmarterSystems.ElliottWavesEngine" Version="1.1.0" />
<PackageVersion Include="SmarterSystems.ElliottWavesEngine" Version="1.1.0" />
<PackageReference Include="SmarterSystems.ElliottWavesEngine" />
paket add SmarterSystems.ElliottWavesEngine --version 1.1.0
#r "nuget: SmarterSystems.ElliottWavesEngine, 1.1.0"
#:package SmarterSystems.ElliottWavesEngine@1.1.0
#addin nuget:?package=SmarterSystems.ElliottWavesEngine&version=1.1.0
#tool nuget:?package=SmarterSystems.ElliottWavesEngine&version=1.1.0
SmarterSystems.ElliottWaves
A forward-projection Elliott Wave detection engine for OHLCV time-series data, written in C# for .NET 10 and .NET 11.
The library detects Cycle-, Primary-, and Intermediate-degree waves on candlestick data by projecting Fibonacci retracement and extension levels forward from confirmed pivots and accepting the most extreme actual price that lands within tolerance. Pattern morphing (impulse, diagonal, A-B-C correction) and Frost-and-Prechter inviolable rules (R1 through R5) are enforced structurally rather than as post-hoc scores.
It includes a ChartRenderer that produces TradingView-styled PNG charts annotated with wave labels, Fibonacci projection targets, and invalidation levels.
The library has been battle-tested in production on the SmarterSystems CryptoWealth trading platform across 11 instruments (BTC, ETH, SOL, AVAX, ADA, LINK, MANA, HBAR, DOT, XRP, SUI).
Install
dotnet add package SmarterSystems.ElliottWavesEngine
Quick start
using SmarterSystems.ElliottWaves.Analyzer.Analysis;
using SmarterSystems.ElliottWaves.Analyzer.Data;
using SmarterSystems.ElliottWaves.Analyzer.Render;
// Load hourly OHLCV candles however you prefer (JSON, exchange API, database).
List<Ohlcv> hourlyData = LoadCandles();
// Run the analyzer.
var analyzer = new ElliottWavesAnalyzer();
var analysis = analyzer.Analyze(hourlyData);
// Walk the detected wave structure.
foreach (var cycleWave in analysis.Waves)
{
Console.WriteLine($"{cycleWave.Degree} {cycleWave.Label}: " +
$"${cycleWave.StartPoint.Price} @ {cycleWave.StartPoint.Timestamp:yyyy-MM-dd} -> " +
$"${cycleWave.EndPoint.Price} @ {cycleWave.EndPoint.Timestamp:yyyy-MM-dd} " +
$"(in-progress: {cycleWave.IsInProgress})");
if (cycleWave.Projection != null)
{
foreach (var target in cycleWave.Projection.Targets)
Console.WriteLine($" target: ${target.Price} (Fib {target.FibonacciLevel:P1}, p={target.Probability:P0})");
}
foreach (var primary in cycleWave.SubWaves ?? new())
Console.WriteLine($" {primary.Degree} {primary.Label}: {primary.PatternType}");
}
// Render to PNG.
byte[] png = ChartRenderer.RenderChart(
symbol: "BTCUSDT",
analysis: analysis,
candleData: hourlyData,
timeframe: CandleTimeframe.Daily);
File.WriteAllBytes("btc-analysis.png", png);
How it works
The detection engine is a forward-projection model rather than a pivot-scoring model. The algorithm:
- Wave 0 is the absolute extreme of the input data, chronologically determining trend direction.
- Wave 1 is confirmed when price retraces more than fifty percent of the move from Wave 0 to the running extreme.
- Wave 2 is the most extreme countertrend pivot that lands within tolerance of one of the Fibonacci retracement levels
[0.786, 0.618, 0.5, 0.382]projected from Wave 1, tried in most-extreme-first order. - Wave 3 is the most extreme trend-direction pivot within tolerance of the Fibonacci extension levels
[4.236, 2.618, 1.618, 1.0]of Wave 1 projected from Wave 2, with0.382retracement confirmation. - Wave 4 is the retracement of Wave 3 using levels
[0.786, 0.618, 0.5, 0.382, 0.236], with the alternation guideline influencing preference. - Wave 5 at Cycle degree is always reported as in-progress with projection targets.
Rule violations trigger morphing rather than rejection:
- Wave 2 retracing beyond Wave 0 morphs the structure to A-B-C.
- Wave 4 overlapping Wave 1 marks the structure as a diagonal.
Below Cycle degree the same algorithm runs wave-by-wave within parent boundaries. Sub-waves cannot be in-progress when the parent is completed.
All Fibonacci math runs in natural-log space to handle the exponential price range of crypto markets cleanly. Tolerances are specified in log-scale, defaulting to two percent.
For the full specification, see docs/specification.md. For the architecture rationale and pseudocode, see docs/design.md. For the Frost-and-Prechter rule reference distilled from the source material, see docs/elliott-wave-reference.md.
Repository layout
SmarterSystems.ElliottWaves.Analyzer/ Class library shipped to NuGet
Analysis/ Detection engine
Interfaces/ Public DTOs and Fibonacci constants
Data/ Ohlcv DTO
Render/ ScottPlot-based chart renderer
SmarterSystems.ElliottWaves.Validation/ MSTest regression suite (one per instrument)
docs/ Specification, design, Elliott Wave reference
scripts/ fetch-test-data.ps1
Building and running tests
The NuGet package targets net10.0 and net11.0. Building the repository requires the .NET 11 SDK, and running the test suite on both target frameworks also requires the .NET 10 runtime.
dotnet restore
dotnet build SmarterSystems.ElliottWaves.sln
dotnet test SmarterSystems.ElliottWaves.Validation/SmarterSystems.ElliottWaves.Validation.csproj
Test data
The regression tests assert exact wave timestamps and prices against snapshot baselines for each of the 11 instruments. The OHLCV input data is not committed to the repository. Fetch it with the included script:
pwsh ./scripts/fetch-test-data.ps1
The script downloads the hourly candles of each instrument from the Binance public API into ./testdata/, from its first Binance candle up to 2026-03-20, the fixed window the snapshot baselines were recorded on. No API key is required. Total download size is approximately ninety megabytes.
If a test data file is missing when a test runs, the test reports Inconclusive rather than failing. This keeps dotnet test runnable on a fresh clone without internet access.
Override the data location via the ELLIOTTWAVES_TESTDATA_PATH environment variable if needed.
Versioning
Semantic versioning. The public DTO contract on ElliottWavesAnalysis, ElliottWave, Projection, Target, and PivotPoint is treated as a stability contract from 1.0.0 onward. Detection-engine internal changes that move wave-detection results trigger a minor version bump, with the regression snapshots updated in the same commit.
Contributing
Issues and pull requests welcome. Please open an issue before submitting larger changes so the design fit can be discussed first. A pull request must keep dotnet build warning-free and must not regress any passing regression test for which test data was downloaded.
License
MIT. See LICENSE.
Copyright 2026 Benjamin Lutz / Smarter Systems.
Acknowledgements
- The Elliott Wave Principle as documented in Frost and Prechter, Elliott Wave Principle: Key to Market Behavior. This implementation is a structural interpretation of the published rules and guidelines; the book remains the governing authority.
- ScottPlot for the rendering backend.
- Binance public klines API for the regression test data.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. net11.0 is compatible. |
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.