Candlesticks · Single-candle patterns
Long line candle: what TA-Lib’s CDLLONGLINE really measures
The long line candle defined precisely, why it fires on about one day in five, how it overlaps other patterns, and what 5,743 cases did next.
On this page
"Long line" is TA-Lib's name for what most candlestick books call a long day: a candle with a tall real body and relatively short shadows. A long white (green) line is a day when the stock opened and then rose substantially to the close. A long black (red) line is the reverse. It is less a pattern than a classification, the building block that other patterns are made of. Morning and evening stars, for example, begin by asking whether the first candle's body is long, and so do many other multi-candle patterns.
That makes the long line useful vocabulary and a poor signal. In our sample of 60 large US stocks and ETFs over two years, TA-Lib flagged 5,743 long lines in 29,760 daily bars, 19.3% of all trading days. A candle that describes one day in five is describing normal trading, not a rare event that should predict what comes next. The data below bears that out.
This page explains exactly what CDLLONGLINE measures (the shadow rule is less obvious than it
looks), why it fires so often, how it nests with the Marubozu candlestick: the shadowless candle, rules and real data and Belt hold candlestick: opening at the extreme, rules and data, two real
cases from 2025 and 2026, and the five-session record of all 5,743.
What a long line looks like
The illustrations above were checked against the real detector. Both pattern candles pass, as designed. So does a routine candle two bars earlier in each trend: its body is only slightly taller than the ten before it, and its shadows are no longer than theirs. Nothing about it would catch a human eye. That is the long line in a nutshell.
In the textbook sense, a long candle shows that one side dominated the session by a wide margin. Nison treats long white and long black candles as basic expressions of strength or weakness, and notes that their significance depends on where they appear: a long white candle breaking out of a range or off support matters more than one in the middle of a trend.
The exact rules Finabase uses
Finabase draws long line markers and scans for them with TA-Lib's CDLLONGLINE:
Condition in CDLLONGLINE |
Default threshold |
|---|---|
| Long real body | Longer than the average body of the previous 10 candles |
| Short upper shadow | Shorter than the average single shadow of the previous 10 candles (their upper plus lower shadows, halved) |
| Short lower shadow | Same threshold as the upper shadow |
The output is +100 when the close is at or above the open and −100 when it is below.
Reading the shadow rule carefully
The shadow test uses TA-Lib's "ShadowShort" setting. For each of the previous ten candles it adds the upper and lower shadow together; it averages those sums and then divides by two. The result is the typical length of one shadow. Today's upper shadow and today's lower shadow must each be shorter than that.
Two consequences:
- "Short" is relative to recent shadows, not to today's body or range. On a stock that has been printing wicky, indecisive candles, the allowance is generous.
- It is a different yardstick from the marubozu's. The marubozu limits each shadow to 10% of the average high–low range, which is usually much tighter. In our sample every one of the 1,227 marubozus also passed the long-line test, but only 21% of long lines were marubozus.
Why it fires so often
In our 60-stock sample, 41% of daily candles had a body longer than the average of the ten before them. A body that is above average is likely to come with shadows that are below average, since a longer body leaves less of the range for wicks. So roughly half of the above-average days slip through the shadow test as well, giving the 19.3% hit rate.
There is no requirement about how much longer the body must be. A candle 1% above the average
qualifies as readily as one three times the average. TA-Lib does have a stricter "very long body"
setting (three times the average), but CDLLONGLINE does not use it.
What a long day does and does not tell you
A long body is a clean record of net movement in one session: buyers or sellers moved the price a long way from the open, and the session did not reject the move with large shadows. That is meaningful information about the day.
It says much less about tomorrow. Long days cluster around news, around the start of trends and around their violent ends. A long white line can be the first day of a breakout, a short-covering spike in a bear market, or the climactic last push of a rally. The candle is the same in all three.
Where long candles earn their keep is inside multi-candle patterns, which add the context the single candle lacks: a long black candle followed by a gap and a small body, then a strong white candle, is a morning star. In patterns like that, the length matters because of what comes before and after it.
Two real long lines
Intel, March 24, 2025. INTC had gained 21.5% in ten sessions. On March 24 it opened at $24.72 and closed at $24.22, a 50-cent body. The average of the previous ten bodies was 44 cents, so this "long" body was just 14% above average. The shadows were 27 cents above and 9 cents below. The next session closed at $24.20, two cents above the low, so it did not confirm. Even so, Intel was down 6.2% after five sessions and 19.2% after ten, through the early-April 2025 sell-off. A trader who read this modest red candle as a top would have been right, but the candle itself was barely distinguishable from its neighbors.
AMD, May 4, 2026. AMD had risen 24.2% in ten sessions. On May 4 it opened at $360.31 and fell to close at $341.54, an $18.77 body, almost exactly twice the recent average. This one is long by any standard. The next session opened at $351.51 and closed at $355.26, recovering most of the drop. Five sessions later the stock was 34.3% higher than the long line's close; ten sessions later 23.3% higher. The chart above also shows how many other long-line markers appeared in the same two months.
The small candle preceded a collapse and the dramatic one preceded a surge. Length was not the variable that mattered.
What 5,743 long lines did next
We ran CDLLONGLINE over daily bars from October 30, 2024 to October 29, 2026 for 60 large US stocks
and ETFs and measured five-session outcomes in the candle's direction.
| Group | Cases | Moved the candle's way in 5 sessions | Avg 5-session return | Avg 10-session return |
|---|---|---|---|---|
| Any day, share higher (baseline, white) | 29,760 | 53.1% | — | — |
| Long white line | 3,084 | 52.1% | +0.15% | +0.45% |
| Long white, confirmed | 1,315 | 54.1% | +0.33% | — |
| Any day, share lower (baseline, black) | 29,760 | 46.7% | — | — |
| Long black line | 2,659 | 48.1% | +0.33% | +0.57% |
| Long black, confirmed | 1,034 | 48.3% | +0.06% | — |
"Confirmed" means the next session closed beyond the candle's extreme (above the high for white, below the low for black); those outcomes are measured from the confirmation close. Returns are plain price changes.
- Long white lines were slightly worse than a random day at 52.1% versus 53.1%, and their average five-session gain of 0.15% was small.
- Long black lines were slightly better than a random day at predicting a decline (48.1% vs 46.7%), yet prices still rose on average after them.
- Confirmation hardly changed anything. 54.1% and 48.3% are within about a point and a half of their baselines.
- The context was mostly with the trend. Only 31.4% of long white lines followed a 10-session decline and 36.9% of long black lines a 10-session rise.
Long line among the body-size patterns
| Pattern | Body rule | Shadow rule | Share of bars | Also a long line |
|---|---|---|---|---|
| Long line | Longer than average | Each shorter than the recent average shadow | 19.3% | 100% |
| Short line candle: a quiet day, the TA-Lib rule and the data | Shorter than average | Each shorter than the recent average shadow | 12.1% | 0% |
| Marubozu candlestick: the shadowless candle, rules and real data | Longer than average | Each under 10% of average range | 4.1% | 100% |
| Belt hold candlestick: opening at the extreme, rules and data | Longer than average | Opening end under 10% of average range | 15.2% | 63% |
| Closing marubozu: a candle that ends at its extreme, tested | Longer than average | Closing end under 10% of average range | 12.8% | 67% |
Long line and short line use the same shadow test with opposite body tests, so a candle can never be both.
An educational outline
For learning only, not a recommendation.
- Treat the marker as a filter input, not a signal. It answers "was this a big-body day?". Combine it with something that answers "where?" and "after what?".
- Measure it yourself. Compare the body with the recent average. A body barely above average, like Intel's 50 cents against 44, is a long line in name only.
- Look for location. A long white line that closes above a multi-week range high is a different event from one in the middle of a trend.
- Illustrative numbers: a long white line from $50.00 to $53.00 closes above a $52.50 range high. A trader using the candle's midpoint ($51.50) as invalidation and entering at $53.00 risks $1.50 per share; a $300 budget is 200 shares.
How Finabase shows long lines
- Chart markers. The study is labeled Long Line Candle. The AMD link above opens it; expect markers on about one bar in five, often on the same bars as Marubozu, Belt Hold or Closing Marubozu markers.
- Scanner. Long white lines go to the Bullish list and long black lines to the Bearish list, by the sign of TA-Lib's output. On an active day a large share of the S&P 500 qualifies.
- Signals tab. In the Candlestick gauge the most recent long line in the last eight bars votes Buy (white) or Sell (black). Because it fires so often, it was voting on 84% of days in our sample (Buy 45.9%, Sell 37.6%) and neutral only 16.4% of the time. In practice the vote tracks whichever color of big candle came last.
Frequently asked questions
What is a long line candle?
A candle whose real body is longer than the average of the previous ten bodies and whose shadows are each shorter than the recent average shadow. TA-Lib calls it CDLLONGLINE; many books call it a long day or a long white or black candle.
Is a long line bullish or bearish?
It takes the color of the body: white is +100, black is −100. That describes the session, not a forecast. In our data neither color predicted the next five sessions better than a random day by more than about a point and a half.
Why does Finabase show so many long line markers?
Because the threshold is the average body, not a multiple of it. In our sample 19.3% of all daily bars qualified.
How is a long line different from a marubozu?
Both need an above-average body. The marubozu also needs both shadows to be under 10% of the average range, which is much stricter than the long line's shadow rule. Every marubozu is a long line; about one long line in five is a marubozu.
Summary
CDLLONGLINE flags candles with an above-average body and below-average shadows. It is a building block
rather than a pattern, and TA-Lib applies no context. In our 60-stock, two-year sample it fired on about
one day in five and its five-session outcomes were within about a point and a half of a random day on
both sides. Use it to describe the size of a session, and look elsewhere for anything resembling a
signal.
Sources and further reading
- Steve Nison, Japanese Candlestick Charting Techniques (New York Institute of Finance, 1991)
- Thomas N. Bulkowski, Encyclopedia of Candlestick Charts (Wiley, 2008)
- TA-Lib source code — CDLLONGLINE and the default candle settings
- Finabase chart data — daily bars for 60 US stocks and ETFs, 2024-10-30 to 2026-10-29; patterns detected with TA-Lib CDLLONGLINE