Custom Candle Builder Node

The Custom Candle Builder defines a single candle by rules: its color, an optional gap from the bar before, and its body and wicks as percentages of the range. Its presets, how its Strength score works, and why a shape sometimes never matches.

NodeBy AlgoLiftUpdated 6 min read
On this page 9How it worksPresetsStrengthExample: buy hammers that are worth noticingSettingsOutputsUse something else whenWhen it doesn't behaveGoing further

Hammers, shooting stars, dojis, marubozus: most single-candle patterns are a statement about proportions. A long lower wick under a small body. A body with almost no wicks at all. The Custom Candle Builder lets you write that statement exactly, as percentages of the candle's range, and tells you on every bar whether the candle that just closed fits it.

Takes
Nothing. It reads its series' candles
Gives
True when the last completed candle fits your shape, plus a fit score and its proportions
Reach for it
An entry or a filter depends on the shape of one candle

How it works

Every candle splits its range into three parts: the upper wick, the body and the lower wick. Measured as percentages of the full range, the three always add up to 100. The builder gives each part a minimum and a maximum, and a candle matches when all three land inside their limits, the limits themselves included.

The Hammer preset, for instance, asks for a body of at most 30%, an upper wick of at most 15% and a lower wick of at least 60%. Because the parts add to 100, setting two of them often decides the third, and the editor's Potential Candles drawing shows what's still possible. If your limits can't add up (minimums over 100%, or maximums that can't reach it), the editor shows "Impossible Pattern" in red, and the node will never match.

Two more rules sit on top of the shape. Candle Direction asks for a color: Bullish means the close is strictly above the open, Bearish strictly below, and Either ignores color. A doji whose close sits exactly on its open only ever matches Either. Prior Gap Requirement asks for a gap between this candle and the one before it.

Like every price-action node, the builder judges a candle once it has closed. When one matches, Pattern Match is true for the whole of the next bar.

Presets

Load Preset opens the Preset Library, with eight shapes under Default Presets. Save As keeps your own under Custom Saved, so a shape you've tuned is one click away on the next strategy.

PresetColorBody, upper wick, lower wick
Hammer / Bullish Pin BarBullish0–30%, 0–15%, 60–100%
Shooting Star / Bearish Pin BarBearish0–30%, 60–100%, 0–15%
Marubozu (Momentum)Either85–100%, 0–10%, 0–10%
Doji (Indecision)Either0–10%, 30–70%, 30–70%
Dragonfly DojiEither0–5%, 0–5%, 90–100%
Gravestone DojiEither0–5%, 90–100%, 0–5%
Spinning TopEither10–30%, 35–50%, 35–50%
Shaven Bottom (Bullish)Bullish60–100%, 0–40%, 0–5%

None of them asks for a gap. Read the color column before you trust a name: the Hammer only takes green hammers and the Shooting Star only red stars, which is stricter than many traders mean.

Strength

Every match also gets a Strength from 0 to 1. For each of the three parts, it measures how close the candle sits to the middle of your range, on a curve that falls away fast toward the edges, and then it averages the three. Mid-range on all three scores 1. Sitting right on a limit scores 0 for that part. A candle that doesn't match scores 0.

That makes Strength a measure of "comfortably inside my limits", not "textbook". The Hammer's upper wick range is 0 to 15%, so its middle is 7.5%, and a hammer with no upper wick at all, the cleanest kind, scores zero on that part. A hammer with a 20% body, no upper wick and an 80% lower wick comes out around 0.63. If you plan to filter on Strength, draw your ranges so their middles are the proportions you want.

Example: buy hammers that are worth noticing

Say you trade ES 15m and want to buy hammers, but not the small ones a quiet afternoon prints. You want a long lower wick on a bar big enough to mean something, and a stop right under it.

Add a Custom Candle Builder and load the Hammer / Bullish Pin Bar preset. Wire its Pattern Match into a Logic AND. Then wire its Candle Size into a Comparison's a and an ATR with Period 14 into b, set it to Greater Than, and wire that into the same AND, so the hammer has to be wider than an average bar. The AND feeds a long Entry.

For the stop, set the Bracket Order's stop to measure from the Signal bar with a distance of 1 point. On a long, that's the low of the last completed bar when the trade fills, which is the hammer, so the stop sits a point under its wick.

Settings

Candle Direction
Default Bullish
Bullish (close above open), Bearish (close below open) or Either (shape only).
Prior Gap Requirement
Default No gap required
No Gap Required, Gap Up (this low above the previous high) or Gap Down (this high below the previous low).
Body Size, min
Default 20%
The smallest body allowed, as a percentage of the candle's range.
Body Size, max
Default 100%
The largest body allowed.
Upper Wick, min
Default 0%
The shortest upper wick allowed, as a percentage of the range.
Upper Wick, max
Default 100%
The longest upper wick allowed.
Lower Wick, min
Default 0%
The shortest lower wick allowed, as a percentage of the range.
Lower Wick, max
Default 100%
The longest lower wick allowed.

Outputs

Pattern Match
True or false
True for the whole bar after a candle that meets every rule.
Strength
Number
From 0 to 1, how centrally the match sits inside your ranges. 0 on every bar that didn't match.
Candle Size
Number
The candle's high minus its low, in points, whether it matched or not.
Body %
Number
The body as a percentage of the range, 0 to 100, match or not.
Upper / Lower Wick %
Number
Each wick as a percentage of the range, match or not.

Use something else when

The pattern spans two or more candles
Engulfing bars, inside bars and three-bar runs are relationships between candles, and that node describes them bar by bar.
Raw sizes in points, or where the bar closed
Body and wicks in points, and the open and close located from 0 to 1, for rules this node's percentages can't express.
The gap at the open
A calendar window's gap field reads a session's opening gap. Gap Up here means two bars whose ranges don't touch.

When it doesn't behave

It never matches

Look for the red "Impossible Pattern" warning first. If the limits are fine, check the color: a candle with no body at all is neither Bullish nor Bearish, so a shape built for dojis belongs on Either. And a Gap Up or Gap Down requirement on intraday bars can rule out nearly everything. The match counter on the editor's preview chart tells you how many sample bars fit while you adjust.

It matches half the bars on the chart

The shape a new node starts with is loose: Bullish with a body of at least 20% describes most green candles. Load a preset or tighten the limits, and add a size condition like the Candle Size against ATR comparison in the example, so small bars can't qualify.

My cleanest hammers get a low Strength

Strength scores how close each part sits to the middle of its range, and the middle of a 0–15% upper wick is 7.5%, not 0. A wickless top looks perfect and scores zero on that part. Either ignore Strength for shapes defined by an extreme, or redraw the ranges around the proportions you want.

Red hammers are ignored

The Hammer preset is Bullish. If a hammer with a red body counts for you, set Candle Direction to Either and save it as your own preset.

Going further

The builder keeps no memory from bar to bar, so it can feed a Since or a Capture, which the stateful pattern nodes can't. "Two hammers in the last 20 bars" is Pattern Match into a Since's condition, window 20, with its Count in last 20 at 2 or more. And to put a shape inside a sequence, AND Pattern Match with a Multi-Bar Formation: both describe the same last completed candle, so "a bearish bar, then a hammer that makes a lower low" is a two-bar formation ANDed with a Hammer.

Price-action settings are swept through presets, so a sweep can try Hammer against Dragonfly Doji, or against shapes you've saved, but not each limit one by one. Even so, every shape you try is one more chance to fit noise, so decide what you mean by a hammer before you look at results, and treat a sweep across ten saved shapes as ten strategies.

Or ask the copilot