Capture Node

The Capture node takes a number at the bar where a condition held, like the high of the bar that crossed, and keeps it for later rules, stops and targets. How it captures, the first-or-last choice, resets, and the classic “break of the setup bar” pattern.

NodeBy AlgoLiftUpdated 5 min read
On this page 8How it worksWhere a captured value goesExample: break the setup bar's highSettingsOutputsUse something else whenWhen it doesn't behaveGoing further

Some levels only exist because something happened. The high of the bar where the averages crossed. The low of the bar that swept the overnight low. The close of the first bar that broke out. The Capture node takes a number at the bar a condition held and keeps it, so a later rule, a stop or a target can trade off it.

Takes
A condition, the number to keep, and an optional reset
Gives
The captured value, the one before it, and the bars since
Reach for it
A level is defined by the bar where something happened

How it works

Wire a true/false value into Condition and a number into Value. At every bar close where the condition holds, Capture reads the value at that close and keeps it. It holds that number, unchanged, until the condition holds again.

Take decides which hold wins. With Last hold, the default, each new hold replaces the old value, so you always have the most recent setup. With First hold, the first hold after a reset is kept and later ones are ignored until the next reset, which is what "the first breakout bar of the day" wants.

Before anything has been captured, and right after a reset, the value is unset. A Comparison against an unset value reads false, and a Crossover has no line to cross, so rules that read a Capture stay quiet until there's something to read.

Capture follows the same bar-close rules as Since. Both the condition and the value are read at bar closes, so the value can be an indicator, a Price History, price action or math on those, but not the live price. For a bar's own high, low or close, use a one-bar Price History with that field.

Where a captured value goes

The Value output is a line like any other. A Comparison can test it, a modifier can read it, and a Crossover can break it on either clock. On the Intrabar clock it's an ideal line, because it only changes when a bar closes.

It can also set a stop or a target. Wire it into a Bracket Order row measured from Level at entry, and the bracket reads the captured level once, when the trade fills. A new capture after that doesn't move the stop.

Example: break the setup bar's high

You trade ES 5m. When the 9 EMA crosses above the 21, you want to mark that bar's high and low, buy the moment price breaks the marked high within the next 10 bars, and put the stop 2 points under the marked low.

Add a Crossover (EMA(9) above EMA(21), Bar close) and two Captures, both with the crossover's Crossed on Condition. Feed one a one-bar Price History of the high and the other a one-bar Price History of the low.

For the entry, wire Current Price into A of a second Crossover, the high Capture's Value into B, and set it to Intrabar. AND it with the high Capture's Bars since Less or Equal 10, and send that into a long Entry. On the Bracket Order, measure the stop from Level at entry, wire the low Capture's Value into the stop's level input, and set the distance to 2 points. Give it a 20-point target from the fill.

Each new cross marks a fresh bar and starts a new 10-bar window. A break after that window is ignored.

Settings

Reset at
Default Never
Never, Session, RTH, Week or Month, on the exchange calendar. A reset clears the value until the next hold. A condition wired into Reset works alongside it.
Horizon
Default 500
How many completed bars it remembers, from 50 to 5,000. A hold older than that is forgotten.
Take
Default Last hold
Last hold keeps the latest. First hold keeps the first one since the reset.
Counted series
Default Follow the condition
Whose bar closes it reads. It only shows when the strategy has more than one series.

Outputs

Value
Number
The number taken at the captured hold. Unset before the first hold and after a reset.
Previous
Number
The number from the hold before that one. It reaches back across a reset, as long as that hold is within the horizon.
Bars since
Number
Completed bars since the captured hold. Compare it to keep only fresh setups.

Use something else when

The stop comes from the entry's own signal bar
If the bar you mean is the one that triggered this entry, measure the stop from Signal bar. Capture is for a setup bar that came earlier.
You want the highest high of the last 20 bars
A level over a window of bars isn't a memory of an event. Price History reads it directly.
You only need when it happened
Bars since, whether it happened, how many times: Since covers those without a value to keep.
The level updates as a pattern develops
A swing high that moves on each pullback, then resets when it's taken out, is a register in a State Machine.

When it doesn't behave

Nothing trades after the session reset

That's the reset working. With Reset at on Session, the value is unset from the open until the condition holds again, and rules reading it stay false until then. If you meant to carry yesterday's level into today, set Reset at to Never.

My breakout fires on a setup from days ago

A Capture keeps its value until the next hold, or until that hold drops out of the horizon, and 500 five-minute bars of ES is the best part of two sessions. Add a freshness check: Bars since Less or Equal N, ANDed into the entry, as in the example.

“First hold” keeps changing

With no reset, First hold means the first hold still inside the horizon, so it moves forward as old bars fall out of memory. Give it a Reset at (Session, usually) and it stays put until the reset.

Some signals don't trade at all

Check where the captured stop sits. A long whose stop is at or above the fill price (a short mirrored) can't open, the way a broker rejects a sell stop above the market. That signal opens nothing, and if the condition is still true on the next trade, the Entry tries again. It happens when price has already traded through the captured level by the time the entry fires.

Going further

Previous makes comparisons between setups easy. Capture the low of every bar where RSI crosses back above 30, and Value Greater Than Previous says this dip held above the last one: a higher low, in one Comparison.

Capture has nothing to sweep. Tune the condition or the distances around it, and keep the idea itself fixed.

Or ask the copilot