Technical complexity of automating wave analysis
We have encountered this situation: a trader uses a standard ZigZag indicator, but the wave labeling is redrawn every time. In algorithmic trading, manual labeling takes hours. Algorithmizing Elliott wave theory is not an easy task.
The market moves in impulses (5 waves) and corrections (3 waves), nested within each other across different timeframes. Most ready-made indicators are limited to one timeframe and do not account for wave hierarchy, which leads to false signals.
Our team has 10+ years of experience in developing trading systems. The system automatically recognizes this structure, generates multiple scenarios with probabilities, and produces trading signals that are resistant to noise. It accounts for up to 5 levels of wave nesting, which is critical for accurate forecasting.
How does automatic Elliott wave analysis work?
The labeling process begins with finding pivot points via the ZigZag indicator (configurable threshold, e.g., 5%). Then a recursive algorithm is launched that iterates through all combinations of 5 consecutive peaks/troughs, checking three hard rules:
- Wave 2 does not retrace more than 100% of wave 1.
- Wave 3 is not the shortest among 1, 3, 5.
- Wave 4 does not enter the range of wave 1.
For each suitable structure, a score is calculated based on proximity to Fibonacci ratios (wave 3 = 161.8% of wave 1, wave 5 = 61.8% of waves 1–3, etc.) and channel analysis. As a result, the top-3 most probable labelings are selected. (Source: book "Elliott Wave Principle" (A.J. Frost, R.R. Prechter))
Why are multiple scenarios more accurate than one?
Generation of alternatives: the system shows not one variant, but three scenarios with probability indicated for each. Invalidation levels: for each labeling, a price level is set; when broken, the scenario is invalidated and revised.
Backtesting: the historical accuracy of the algorithm is calculated automatically — we see what percentage of forecasts was confirmed. This approach reduces the risk of false signals and makes the system more reliable.
Comparison with ready-made indicators
The standard ZigZag indicator redraws on every new bar and does not provide clear forecasts. Our algorithm is 2-3 times more accurate by accuracy (based on backtesting results on Bitcoin and EURUSD).
It does not merely show turns; it identifies completed wave structures and calculates targets based on Fibonacci extensions.
| Parameter | Standard ZigZag | Our algorithm |
|---|---|---|
| Redrawing | Every new bar | Fixed labeling after confirmation |
| Number of scenarios | One | Three with probabilities |
| Target forecast | No | Based on Fibonacci extensions |
| Accuracy on historical data | Unknown | 60-75% (depends on market) |
What is included in development (deliverables)
| Component | Description |
|---|---|
| Labeling algorithm | Python module with recursive wave search and scoring based on Elliott and Fibonacci rules |
| Multiple scenarios | Generation of top-3 labelings with probabilities and invalidation levels |
| Visualization | TradingView widget with overlaid wave labels, channels, and targets |
| Signals | Automatic notifications to Telegram/email when a wave completes or a trading signal appears |
| Backtesting | Module for evaluating accuracy on historical data for a selected period |
| Documentation | API description, instructions for configuring parameters, examples |
Example of the algorithm in action
We took Bitcoin 4h during a period of high volatility. The algorithm found 12 completed wave structures. 9 of them were confirmed by subsequent movement (75% accuracy). Invalidation triggered in 3 cases, preventing losses.How to set up the system in 4 steps
- Connect exchange or broker API — we get access to historical OHLCV data.
- Choose timeframes — the system can work simultaneously on several (e.g., 1h for entry, 4h for context).
- Start training — backtesting selects optimal ZigZag thresholds and Fibonacci coefficients for your asset.
- Receive signals — the system starts analyzing the market in real time and sending notifications.
Technical implementation
Backend: Python with numpy, pandas libraries for data, scipy for optimization. The labeling algorithm is implemented recursively — it iterates through combinations of pivot points and checks the rules.
Storage: PostgreSQL — tables wave_structures (wave labeling), wave_projections (target levels), wave_alerts (signal history).
Visualization: TradingView Lightweight Charts + SVG overlays. Each wave is labeled (1-5 or A-C), and channels are drawn for impulses.
Alert system: Telegram bot sends messages like: “BTC/USDT 4h — completion of wave 4, wave 5 target: projected level, stop: invalidation level, probability: 68%”.
Development timeline and investments
Cost is calculated individually after an audit — it depends on integration complexity and required modules. Developing the system costs less than hiring an analyst for six months. Timeline: from 2 to 6 weeks for the basic version. We will evaluate your project.
Contact us to discuss details. Order the development of a system for your trading strategy — we will audit your data and propose a solution. Get a consultation on developing a wave analysis system. We guarantee support after implementation.







