Methodology
How ChartFluent builds its charts, defines each pattern, checks every answer with code and keeps prediction out of the grading.
Where the charts come from
The charts in the exercises are simulated. Each one is generated from a seeded random walk: the same seed always gives the same chart, so every exercise can be reproduced and checked. We use simulated charts because no free source of real stock prices clearly allows showing them on a public website.
How a pattern is defined
Pattern names are old trader vocabulary with no single official definition. We publish the exact thresholds the site uses, and the same numbers are used to build the charts, to grade your answers and to test the site:
Candle thresholds
| Rule |
|---|
| Doji: body at most 10% of the candle's high-to-low range |
| Dragonfly and gravestone doji: the short wick is at most 10% of the range |
| Dragonfly and gravestone doji: the long wick is at least 60% of the range |
| Hammer, hanging man, shooting star, inverted hammer: body more than a doji's and at most 35% of the range |
| Hammer family: the long wick is at least 2 times the body |
| Hammer family: the other wick is at most 15% of the range |
| Prior trend measured on the closes of the 5 candles before the pattern |
| A prior trend needs a move of at least 2% over that lookback |
| A long candle has a body of at least 60% of its range |
| Harami: the second body sits inside the first and is at most 60% of its size |
| Morning and evening star: the middle body is at most 30% of the first body |
| Morning and evening star: the third body is at least 50% of the first body and closes past its middle |
Candlestick patterns
| Pattern | Definition used on this site |
|---|---|
| Doji | Body at most 10% of the candle's range |
| Dragonfly doji | A doji with almost no upper wick (at most 10% of the range) and a lower wick of at least 60% |
| Gravestone doji | A doji with almost no lower wick (at most 10% of the range) and an upper wick of at least 60% |
| Hammer | Body more than 10% and at most 35% of the range, lower wick at least 2 times the body, upper wick at most 15%, after a fall of at least 2% over 5 candles |
| Hanging man | The hammer's shape after a rise |
| Shooting star | The hammer's shape upside down (long upper wick) after a rise |
| Inverted hammer | The shooting star's shape after a fall |
| Engulfing | Two candles: the second body opens at or beyond the first close and covers the whole first body, in the opposite color (green over red: bullish; red over green: bearish) |
| Bullish engulfing | A red candle, then a green candle opening at or below its close and closing at or above its open, with a bigger body |
| Bearish engulfing | A green candle, then a red candle opening at or above its close and closing at or below its open, with a bigger body |
| Harami | Two candles: the second body opens inside the first body, stays inside it and is at most 60% of its size, in the opposite color |
| Bullish harami | A red candle, then a smaller green body that opens and closes inside the red body and is at most 60% of its size |
| Bearish harami | A green candle, then a smaller red body that opens and closes inside the green body and is at most 60% of its size |
| Piercing line | A long red candle (body at least 60% of its range), then a green candle opening at or below its close and closing above the middle of its body but below its open |
| Dark cloud cover | The piercing line upside down: a long green candle, then a red candle closing below the middle of its body but above its open |
| Morning star | A long red candle, a small body (at most 30% of the first) low in or under it, then a green candle closing above the middle of the first with a body of at least 50% of it |
| Evening star | The morning star upside down: a long green candle, a small body high in or above it, then a red candle closing below the middle of the first |
| Three white soldiers | Three long green candles (bodies at least 60% of their range), each opening inside the previous body and closing higher |
| Three black crows | Three long red candles, each opening inside the previous body and closing lower |
Swing points, levels, trends and chart patterns
| Rule |
|---|
| Swing high: a candle whose high is above the highs of the 3 candles before it and not below the highs of the 3 after it, so a tie counts once, at the first candle (swing low: the mirror) |
| Touches of the same level: swing points within 0.5 average candle range of each other |
| Support or resistance: at least 3 touches |
| Uptrend: the last swing high and swing low are each at least 0.5% above the previous ones (downtrend: below) |
| Triangle and wedge lines count as flat when they move less than 1% across the pattern |
| Every swing point of a triangle, wedge or channel is within 1.2% of its line |
| Triangles and wedges narrow to at most 75% of their starting width |
| Channels keep between 80% and 125% of their starting width |
| Double top or bottom: two peaks within 1.5% of each other, at least 5 candles apart, with a 3% trough between |
| Double top: price rose into the first peak from below the trough within the 8 candles before it |
| Head and shoulders: the head at least 2% above both shoulders; the shoulders differ by at most 3% of the head's price; the two troughs are within 2% of each other and both at least 2% below the lower shoulder |
| Flag: a pole of at least 8% in at most 8 candles, then 4 to 12 candles giving back at most 50% of it, drifting sideways or down |
| Cup and handle: rims within 3%, depth 8% to 40%, at least 6 candles in the bottom quarter (rounded), then a shallow handle |
| Cup: rims at least 12 candles apart; handle of 3 to 10 candles that stays in the upper half of the cup and below the right rim |
| A double top's trough is sharp: at most 4 candles in its bottom quarter |
| Breakout: a close beyond the level by at least 0.25 average candle range; a wick beyond it with a close back inside is a fakeout |
| Volume confirms a breakout at 1.5 times the average volume of the 20 candles before; a climax bar is at least 2.5 times (counted from the 11th candle of a chart) |
| Divergence: price makes a higher high while RSI is at least 2 points lower (or volume at least 30% lower) |
| Double bottom, inverse head and shoulders, bear flag and bullish divergence: the top-side rule applied to the chart flipped upside down (each price p becomes highest high + lowest low - p), so their percentages are measured on the flipped prices |
| Drawing a level: a line counts when it lands within 8% of the chart's visible price range from the level, or anywhere inside the zone its touches form (wick tips to body edges): a level is a zone, not a single price |
Indicators
| Definition |
|---|
| Simple moving average (SMA): the plain mean of the last n closes |
| Exponential moving average (EMA): starts from the SMA of the first n closes, then each new close gets a weight of 2 / (n + 1) |
| RSI 14 (Wilder): first average gain and loss are simple means of the first 14 changes, then each is smoothed as (previous x 13 + new) / 14; RSI = 100 - 100 / (1 + average gain / average loss) |
| MACD 12/26/9: EMA(12) minus EMA(26) of the closes; the signal line is the EMA(9) of the MACD; the histogram is MACD minus signal |
| Bollinger Bands 20/2: SMA(20) of the closes, plus and minus 2 population standard deviations of the same 20 closes |
| Average true range (Wilder, 14): true range is the largest of high minus low and the gaps from the previous close, smoothed like RSI |
How answers are checked
- A chart for "find the doji" is built so that exactly one candle meets the doji rule. Code checks it before the chart is shown, and automated tests check thousands of generated charts before each update.
- Calculators use the formulas shown on their page, and tests compare them with worked examples. The risk lessons use the same formulas, and a test fails if the two ever disagree.
What we never grade
We never score a guess about what the price does next. When a lesson reveals the rest of a chart, it is for learning only, and the share of simulated continuations that ended higher is shown instead of a grade. On a simulated chart the future is random by construction: the continuations are drawn with no drift, a fair coin on purpose.
Patterns describe what happened; they do not promise what happens next. Researchers have tested whether candlestick and chart patterns carry information or create value for investors (two of those studies are listed below). Results depend on the market, the period, the exact rules and trading costs, so this site never quotes a success rate for any pattern.
Sources
- Introduction to investing (SEC, Investor.gov)
- Marshall, Young and Rose (2006), Candlestick technical trading strategies: Can they create value for investors? Journal of Banking & Finance 30(8) (Research paper)
- Lo, Mamaysky and Wang (2000), Foundations of Technical Analysis: Computational Algorithms, Statistical Inference, and Empirical Implementation. Journal of Finance 55(4) (Research paper)