Once Per¶
Flow · Counter
Pass the input signal through only the FIRST time it's true after each reset, then suppress it until the next reset. Wire NewSession into Reset for 'one entry per session'; a day-of-week change or any edge works too. Reset unwired → fires only once ever.
Once Per lets a signal through only the first time it's true after each reset, then suppresses every repeat until the next reset. It's the "one and done" filter — the fix for a condition that stays true for several bars (or fires repeatedly) when you only want to act on it once per session, per day, or per setup.
How it works¶
Two inputs: the signal to filter and a reset signal. It passes the signal through on the first true bar after a reset, then blocks all further trues until reset fires again — at which point it re-arms. Wire something like New Session into reset for "once per session." If reset is left unwired, it fires exactly once, ever. Lookahead-free.
When to use it¶
Use it to cap how often a rule can act: one entry per session, one alert per day, one response per breakout. It's the deterministic way to prevent a persistent or repeating condition from stacking multiple entries — cleaner than a fixed Cooldown when the natural boundary is an event (a new session, a new day) rather than a bar count.
Example¶
One entry per session: wire your entry trigger into signal and New Session into reset. The first valid trigger each session gets through; any further triggers that session are ignored until the next session opens. Feed the result into the Tester.
Tips & gotchas¶
- Reset unwired → fires once ever — usually you want a session/day reset wired in.
- Event-based, not time-based — pair with Cooldown if you need a bar-count gap instead.
- Re-arms on reset — the count of allowed fires is one per reset interval.
Related blocks¶
Inputs¶
| Socket | Type | What to wire in |
|---|---|---|
| In | signal |
Signal to throttle to once-per-window. |
| Reset (optional) | signal |
Re-arm on this edge (e.g. NewSession). Optional. |
Outputs¶
| Output | Type | Plots as | Description |
|---|---|---|---|
| Once | signal |
Signal arrows | First true per reset window. |
Reference auto-generated from the block catalog · category Flow.