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
Outputs
Use something else when
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.