Back to builder reference

Condition

latch
entryexitgate

EDGE with memory: true on the one close where fire holds after arm held on an earlier close, then disarmed. USE WHEN an event must follow a precondition — price re-enters a band after leaving it (arm=outside, fire=inside), first touch of a level after being clear of it, a rising edge of any condition (arm=not(c), fire=c). arm wins if both are true on one close; if either side has no value the result has none and the latch keeps its state. Never reset by positions. Children are inline conditions or condition_refs; it cannot hold a schedule or a stop/target. DO NOT USE for a plain level — use 'compare'.

Category

Temporal

Discriminator

kind = "latch"

Roles

entry, exit, gate

Required fields

armreqConditionCondition that arms the latch on any close where it is true. Arming wins if `fire` is true on the same close.
firereqConditionCondition that, while the latch is armed, makes it true for that one close and disarms it.

Optional fields

kindstring-
Quawd

A subscription SaaS platform for designing, backtesting, and paper-trading algorithmic trading strategies on equities and crypto — described in plain English to an AI agent, no code required.

© 2026 Quawd. All rights reserved.

Quawd is a software tool, not a broker-dealer or investment adviser, and does not provide investment advice. Trading involves substantial risk of loss. Backtested and hypothetical results have inherent limitations and are not indicative of future performance.