ftInvstr
PATTERN LIBRARY
Candlestick Patterns
Every pattern ships with its definition, the scenario where it works, and a ready-to-run backtest expression. Hit Use Pattern to open Strategy Lab pre-filled, or select 2+ and combine them with AND / OR / SUM logic.
⧉ MULTI-PATTERN MODE 0 selected
REVERSAL
Hammer
BULLISH
click to expand
Small body at the top with a long lower shadow (at least 2x body). Signifies rejection of lower prices.
WHEN IT WORKS
Most reliable during a downtrend. Look for a large bullish candle following this hammer to confirm the reversal.
ENGINE EXPRESSION
order(normalize(if_else(logical_and(gt(lower_shadow(), multiply(2, body_size())), lt(upper_shadow(), multiply(0.1, lower_shadow()))), rank('Close'), neg(rank('Close')))), 0.75, 0.25, 1)
▶ Use Pattern
REVERSAL
Inverted Hammer
BULLISH
click to expand
Small body at the bottom with a long upper shadow. Suggests buyers are starting to push back after a downtrend.
WHEN IT WORKS
Excellent for spotting early reversals in a downtrend. Ensure the next candle opens above the hammer's body.
ENGINE EXPRESSION
order(normalize(if_else(logical_and(gt(upper_shadow(), multiply(2, body_size())), lt(lower_shadow(), multiply(0.1, upper_shadow()))), rank('Close'), neg(rank('Close')))), 0.75, 0.25, 1)
▶ Use Pattern
REVERSAL
Bullish Engulfing
BULLISH
click to expand
A large green body that completely covers the previous day's red body. Strong reversal signal.
WHEN IT WORKS
Highly potent after a prolonged descent. Use as a strong signal to exit shorts or initiate long-only modes.
ENGINE EXPRESSION
order(normalize(if_else(logical_and(gt('Close', 'Open'), logical_and(lt(delay('Close', 1), delay('Open', 1)), logical_and(gt('Close', delay('Open', 1)), lt('Open', delay('Close', 1))))), rank('Close'), neg(rank('Close')))), 0.8, 0.2, 1)
▶ Use Pattern
REVERSAL
Dragonfly Doji
BULLISH
click to expand
T-shaped candle with no body and a very long lower shadow. Bullish rejection at support.
WHEN IT WORKS
Look for this near major support levels. It indicates total seller exhaustion and is a high-conviction reversal sign.
ENGINE EXPRESSION
order(normalize(if_else(logical_and(lt(body_size(), multiply(0.05, candle_range())), lt(upper_shadow(), multiply(0.05, candle_range()))), rank('Close'), neg(rank('Close')))), 0.8, 0.2, 1)
▶ Use Pattern
REVERSAL
Piercing Line
BULLISH
click to expand
Current green candle opens below previous low but closes above the midpoint of the previous red body.
WHEN IT WORKS
Best used in sideways markets or shallow pullbacks to identify where buyers are stepping back in.
ENGINE EXPRESSION
order(normalize(if_else(logical_and(lt(delay('Close', 1), delay('Open', 1)), logical_and(gt('Close', 'Open'), logical_and(lt('Open', delay('Low', 1)), gt('Close', add(delay('Close', 1), multiply(0.5, abs_val(subtract(delay('Open', 1), delay('Close', 1))))))))), rank('Close'), neg(rank('Close')))), 0.75, 0.25, 1)
▶ Use Pattern
REVERSAL
Morning Star
BULLISH
click to expand
Three-candle pattern: Tall red, small indecisive middle, tall green candle. Classic reversal.
WHEN IT WORKS
One of the most reliable 3-day patterns. Trade if the third candle's volume is higher than the first.
ENGINE EXPRESSION
order(normalize(if_else(logical_and(lt(delay('Close', 2), delay('Open', 2)), logical_and(lt(abs_val(subtract(delay('Open', 1), delay('Close', 1))), multiply(0.2, abs_val(subtract(delay('Open', 2), delay('Close', 2)))), gt('Close', delay('Open', 2)))), rank('Close'), neg(rank('Close')))), 0.85, 0.15, 1)
▶ Use Pattern
REVERSAL
Shooting Star
BEARISH
click to expand
Small body at the bottom with a long upper shadow (2x body). Signifies rejection of higher prices.
WHEN IT WORKS
Reliable at the peak of an uptrend. If price fails to break the star's high, expect a significant correction.
ENGINE EXPRESSION
order(normalize(if_else(logical_and(gt(upper_shadow(), multiply(2, body_size())), lt(lower_shadow(), multiply(0.1, upper_shadow()))), neg(rank('Close')), rank('Close'))), 0.25, 0.75, 1)
▶ Use Pattern
REVERSAL
Hanging Man
BEARISH
click to expand
Looks like a Hammer but appears at the top of an uptrend, signaling potential exhaustion.
WHEN IT WORKS
Beware: looks bullish but indicates that the price is finally vulnerable to selling pressure at the top.
ENGINE EXPRESSION
order(normalize(if_else(logical_and(gt(lower_shadow(), multiply(2, body_size())), lt(upper_shadow(), multiply(0.1, lower_shadow()))), neg(rank('Close')), rank('Close'))), 0.25, 0.75, 1)
▶ Use Pattern
REVERSAL
Bearish Engulfing
BEARISH
click to expand
A large red body that completely covers the previous day's green body.
WHEN IT WORKS
A classic 'Exit' signal. Most effective on daily timeframes following a multi-day rally.
ENGINE EXPRESSION
order(normalize(if_else(logical_and(lt('Close', 'Open'), logical_and(gt(delay('Close', 1), delay('Open', 1)), logical_and(lt('Close', delay('Open', 1)), gt('Open', delay('Close', 1))))), neg(rank('Close')), rank('Close'))), 0.2, 0.8, 1)
▶ Use Pattern
REVERSAL
Gravestone Doji
BEARISH
click to expand
Upside-down T candle with no body and long upper shadow. Bearish rejection at resistance.
WHEN IT WORKS
The counterpart to the Dragonfly. Signals a failed attempt to rally; target short positions towards previous lows.
ENGINE EXPRESSION
order(normalize(if_else(logical_and(lt(body_size(), multiply(0.05, candle_range())), lt(lower_shadow(), multiply(0.05, candle_range()))), neg(rank('Close')), rank('Close'))), 0.2, 0.8, 1)
▶ Use Pattern
REVERSAL
Dark Cloud Cover
BEARISH
click to expand
Current red candle opens above previous high but closes below the midpoint of the previous green body.
WHEN IT WORKS
Watch for this after an earnings rally or overextended move. Confirms sellers are returning in force.
ENGINE EXPRESSION
order(normalize(if_else(logical_and(gt(delay('Close', 1), delay('Open', 1)), logical_and(lt('Close', 'Open'), logical_and(gt('Open', delay('High', 1)), lt('Close', subtract(delay('Close', 1), multiply(0.5, body_size(delay('Open', 1), delay('Close', 1)))))))), neg(rank('Close')), rank('Close'))), 0.25, 0.75, 1)
▶ Use Pattern
REVERSAL
Evening Star
BEARISH
click to expand
Three-candle pattern: Tall green, small middle, tall red candle closing deep into the first body.
WHEN IT WORKS
Powerful top-reversal sign. Use to start profit-taking or switch to bearish momentum modes.
ENGINE EXPRESSION
order(normalize(if_else(logical_and(gt(delay('Close', 2), delay('Open', 2)), logical_and(lt(abs_val(subtract(delay('Open', 1), delay('Close', 1))), multiply(0.2, abs_val(subtract(delay('Open', 2), delay('Close', 2)))), lt('Close', delay('Open', 2)))), neg(rank('Close')), rank('Close'))), 0.15, 0.85, 1)
▶ Use Pattern
MOMENTUM
Bullish Marubozu
BULLISH
click to expand
Solid green body with little to no shadows. Shows total buyer dominance from open to close.
WHEN IT WORKS
Best for trend confirmation. If this breaks a resistance level, the breakout is likely extremely strong.
ENGINE EXPRESSION
order(normalize(divide(body_size(), maximum(candle_range(), 0.001))), 0.6, 0.4, 1)
▶ Use Pattern
MOMENTUM
Bearish Marubozu
BEARISH
click to expand
Solid red body with little to no shadows. Shows total seller dominance.
WHEN IT WORKS
Indicates panic selling. Use with high-frequency rebalancing to capture rapid downward moves.
ENGINE EXPRESSION
order(normalize(if_else(logical_and(lt('Close', 'Open'), gt(divide(body_size(), maximum(candle_range(), 0.001)), 0.95)), neg(rank('Close')), rank('Close'))), 0.2, 0.8, 1)
▶ Use Pattern
INDECISION
Doji
NEUTRAL
click to expand
Classic Doji where the range is large but the body is tiny. High indecision.
WHEN IT WORKS
Don't trade blindly. Wait for a breakout of the Doji's high or low to determine the next trend direction.
ENGINE EXPRESSION
order(normalize(neg(divide(body_size(), maximum(candle_range(), 0.001)))), 0.55, 0.45, 1)
▶ Use Pattern
INDECISION
Spinning Top
NEUTRAL
click to expand
Small body with long upper and lower shadows of nearly equal length.
WHEN IT WORKS
Often found at the end of trends. Signals exhausting momentum; prepare for a reversal or consolidation.
ENGINE EXPRESSION
order(normalize(if_else(logical_and(lt(body_size(), multiply(0.3, candle_range())), lt(abs_val(subtract(upper_shadow(), lower_shadow())), multiply(0.1, candle_range()))), neg(abs_val(returns())), rank('Close'))), 0.55, 0.45, 1)
▶ Use Pattern