Client-side market structure scanner that detects candlestick and chart patterns, draws detected structures on interactive charts, and computes historical probabilities from your own dataset.
CandleEdge is an open-source technical analysis tool built with modern web technologies.
It helps traders and analysts understand how specific candlestick and chart patterns have historically behaved within their own market data.
The project focuses on descriptive statistical analysis rather than prediction.
Instead of claiming to forecast markets, CandleEdge analyzes what previously happened after similar historical structures appeared in the loaded dataset.
Questions the tool explores include:
- How often did price move higher after this pattern appeared?
- Did a setup behave differently after 3 candles versus 20 candles?
- How large were the average and median moves?
- Is there enough historical sample size to take the statistics seriously?
All calculations are deterministic and reproducible.
No AI-generated signals.
No machine learning black boxes.
No hidden server-side analytics.
Just transparent calculations running directly in the browser.
Imagine loading years of market data into a tool that automatically finds:
- ascending triangles
- falling wedges
- bullish engulfing candles
- bearish pennants
- hammers
- dojis
- momentum structures
Then imagine the software scanning every historical occurrence and showing what price did afterward.
That is what CandleEdge does.
For example:
- one pattern may have moved upward 67% of the time after 10 candles
- another may have failed most of the time after only 3 candles
- another may show strong movement but only have 6 historical occurrences, reducing confidence
CandleEdge does not attempt to predict the future.
Instead, it answers a simpler question:
βHow has this exact structure historically behaved inside this dataset?β
The project is essentially a statistical market structure explorer.
Not:
βThis pattern guarantees profit.β
But:
βThis pattern historically behaved this way under these conditions.β
Additional technical documentation:
- π Model Notes β explains the statistical engine, confidence scoring, weighted edge calculations, and system limitations
- βοΈ Function Reference β explains the major JavaScript functions and application architecture
Many modern trading platforms advertise βAI-powered predictions.β
CandleEdge intentionally avoids this approach.
The statistical engine uses straightforward calculations:
- historical occurrence counting
- percentage change calculations
- averages
- medians
- probability ratios
- sample-size confidence grading
Everything is transparent and inspectable in the source code.
Your market data never leaves your computer.
CandleEdge runs entirely inside the browser.
- no accounts
- no cloud processing
- no uploaded datasets
- no API keys required
- no server-side analytics
The same dataset produces the same results every time.
No randomness.
No hidden weighting systems.
No undisclosed optimization logic.
CandleEdge is designed more like a research sandbox than a signal-selling platform.
The purpose is to help users explore:
- structure behavior
- historical tendencies
- statistical edge
- sample reliability
- market context
| Pattern | Bias |
|---|---|
| Doji | Neutral |
| Dragonfly Doji | Bullish |
| Gravestone Doji | Bearish |
| Long-Legged Doji | Neutral |
| Spinning Top | Neutral |
| Bullish Engulfing | Bullish |
| Bearish Engulfing | Bearish |
| Bullish Outside Bar | Bullish |
| Bearish Outside Bar | Bearish |
| Inside Bar | Neutral |
| Hammer | Bullish |
| Inverted Hammer | Bullish |
| Hanging Man | Bearish |
| Shooting Star | Bearish |
| Three White Soldiers | Bullish |
| Three Black Crows | Bearish |
| Morning Star | Bullish |
| Evening Star | Bearish |
| Piercing Pattern | Bullish |
| Dark Cloud Cover | Bearish |
| Tweezer Top | Bearish |
| Tweezer Bottom | Bullish |
| Bullish Harami | Bullish |
| Bearish Harami | Bearish |
| Bullish Kicker | Bullish |
| Bearish Kicker | Bearish |
| Bullish Marubozu | Bullish |
| Bearish Marubozu | Bearish |
| NR4 | Neutral |
| NR7 | Neutral |
| Long Lower Wick Rejection | Bullish |
| Long Upper Wick Rejection | Bearish |
| Pattern | Bias |
|---|---|
| Ascending Triangle | Bullish |
| Descending Triangle | Bearish |
| Symmetrical Triangle | Neutral |
| Rising Wedge | Bearish |
| Falling Wedge | Bullish |
| Bullish Pennant | Bullish |
| Bearish Pennant | Bearish |
| Bull Flag | Bullish |
| Bear Flag | Bearish |
| Rising Channel | Bullish |
| Falling Channel | Bearish |
| Rectangle Range | Neutral |
| Double Top | Bearish |
| Double Bottom | Bullish |
| Triple Top | Bearish |
| Triple Bottom | Bullish |
| Head and Shoulders | Bearish |
| Inverse Head and Shoulders | Bullish |
| Cup and Handle | Bullish |
| Break of Structure (Bullish) | Bullish |
| Break of Structure (Bearish) | Bearish |
| Liquidity Sweep High | Bearish |
| Liquidity Sweep Low | Bullish |
| Higher High | Bullish |
| Higher Low | Bullish |
| Lower High | Bearish |
| Lower Low | Bearish |
| Support Bounce | Bullish |
| Resistance Rejection | Bearish |
Chart structures are generated using swing-high, swing-low, and local-extrema detection logic and visualized directly on the chart with trendlines and structure markers.
For each detected pattern:
- Historical occurrences are located throughout the dataset
- Forward price movement is measured after:
- 3 candles
- 5 candles
- 10 candles
- 20 candles
- Bullish vs bearish movement percentages are calculated
- Average and median returns are computed
- Sample size reliability is measured
- The strongest forward window is selected using weighted scoring
| Sample Size | Confidence |
|---|---|
| 30+ occurrences | High |
| 15β29 occurrences | Moderate |
| 5β14 occurrences | Low |
| Below 5 | No statistics shown |
Confidence is based strictly on historical sample count.
The engine selects the strongest statistical window using:
Score =
(Directional Strength Γ 0.5)
+ (Move Magnitude Γ 0.3)
+ (Sample Reliability Γ 0.2)This prioritizes directional consistency over raw move size.
- β CSV import support
- β Flexible date parsing
- β Historical OHLCV analysis
- β Interactive candlestick charts
- β Candlestick pattern detection
- β Chart pattern detection
- β Historical probability engine
- β Confidence grading
- β Trendline visualization
- β Multi-timeframe resampling
- β Current / Recent / Historical pattern explorer
- β Weighted edge ranking
- β Live crypto market mode
- β Coinbase integration
- β Web Share API support
- β Fully client-side architecture
- β MIT licensed open source
CandleEdge is built entirely with lightweight browser-native technologies.
- Alpine.js
- Tailwind CSS
- Lightweight Charts
- PapaParse
- Native JavaScript statistical calculations
- File API
- WebSocket API
- Web Share API
- LocalStorage API
- lightweight
- browser-native
- fully client-side
- offline-capable
- easy to fork
- open-source
- no backend required
β‘οΈ https://michaelsboost.com/CandleEdge
Clone the repository:
git clone https://github.com/michaelsboost/CandleEdge.git
cd CandleEdgeStart a local server:
python3 -m http.server 8000Then open:
http://localhost:8000No build process required.
CandleEdge supports CSV files with columns such as:
DATE,OPEN,HIGH,LOW,CLOSE,ADJ CLOSE,VOLUMEExample:
"DATE","OPEN","HIGH","LOW","CLOSE","ADJ CLOSE","VOLUME"
"May 22, 2026",100.00,105.50,99.50,104.20,104.20,1000000The parser supports:
- quoted headers
- unquoted headers
- Unix timestamps
- human-readable dates
- CLOSE or ADJ CLOSE fallback handling
- automatic invalid-row filtering
- chronological sorting
Minimum requirement:
- 50 valid candles
CandleEdge is an experimental educational analysis tool.
The statistics shown are descriptive only.
They describe what historically happened inside the loaded dataset and should not be interpreted as guarantees or predictions.
Results depend heavily on:
- dataset quality
- market regime
- historical sample size
- survivorship bias
- simplified pattern definitions
This project is intended for:
- research
- exploration
- learning
- systems thinking
- statistical analysis
Not financial advice.
Pull requests, ideas, improvements, and bug reports are welcome.
Potential areas for expansion include:
- additional chart structures
- additional candlestick patterns
- statistical export systems
- advanced probability metrics
- drawdown analysis
- multi-timeframe correlation
- backtesting systems
- accessibility improvements
- mobile optimization
CandleEdge is an independent open-source project built and maintained by one person.
If you find the project useful:
- β Star the repository
- π’ Share the project
- π§ Contribute improvements
- πΈ Support development: https://michaelsboost.com/donate
Support helps fund future development, testing, research, and additional open-source tools.
CandleEdge is licensed under the MIT License.
See: LICENSE
Michael Schwartz
https://michaelsboost.com
