Concept

Filter-setup-trigger-exit Architecture

Filter-setup-trigger-exit Architecture, also known as StrategySpec anatomy, setup lifecycle state machines, is a Meta & Composition concept. A reference entry: the Library explains it rather than implements it.

What is Filter-setup-trigger-exit Architecture?

Filter-setup-trigger-exit architecture decomposes a rules-based strategy into four layered roles. The filter decides whether trading is allowed at all: regime, session, direction, for example a higher-timeframe trend filter. The setup arms a candidate trade when conditions align, such as a pullback reaching a zone. The trigger is the discrete event that actually enters, a close beyond a level or a crossover. The exit owns everything after entry: initial stop, targets, and trailing rules. In code this runs as a small state machine stepping through idle, armed, in-position, and flat.

The pattern is systems-trading folklore formalized: layered designs run through the literature (triple-screen methods filter on one timeframe and trigger on another) and through modern modular communities, whose system templates assign every indicator a single role, baseline, confirmation, entry, exit, rather than letting one condition do four jobs. The architecture names what disciplined designers were already doing and gives testing a vocabulary for it.

The value is separation of concerns. Filters answer whether to look, triggers answer when to act, and conflating the two produces systems that enter on context (chronically early) or filter on timing (chronically late). The decomposition also keeps testing honest, because layers can be swapped or removed one at a time to see which is doing the work. Setups usually carry an expiry, a bar count after which an untriggered setup disarms, so stale context cannot fire a fresh entry.

The layer boundaries are where engineering lives. Filters are typically slow classifiers (trend/range state, session windows, proximity to higher-timeframe levels); setups encode location and condition with an expiry and a re-arm rule; triggers are single bar-resolution events, precise enough to timestamp; exits are their own subsystem, not an afterthought, holding the stop logic, targets, and trails that decide the trade's arithmetic. Between the layers sits the plumbing, cooldowns, one-position limits, duplicate suppression, stated once and enforced at the boundary.

How to structure a strategy in this architecture

The exercise is assigning every rule exactly one role, then wiring the boundaries.

  1. 1Write the filter first: the regime, session, and direction conditions under which the system is allowed to look, and outside which it is flat by definition.
  2. 2Define the setup as a state with an expiry: what alignment arms a candidate, how many bars it stays armed, and what re-arms it after disarming.
  3. 3Pin the trigger to one event: a specific close, cross, or break, precise enough that two implementations would fire on the same bar.
  4. 4Build the exit as a first-class block: initial stop, target structure, and trailing rule, owned by the exit layer rather than scattered through entry logic.
  5. 5Add the boundary plumbing: cooldowns after exits, one-position-at-a-time limits, and duplicate suppression between setup and trigger, the signal hygiene layer.
  6. 6Test by ablation: run the system with each layer removed or replaced by a baseline, so the contribution of every role is measured instead of assumed.

How traders use it

  • As a design template: writing a new system as filter, setup, trigger, exit forces explicit answers about regime, condition, timing, and management instead of one tangled entry condition that mixes all four.
  • As a debugging frame: when a backtest degrades, ablating one layer at a time (run without the filter, loosen the trigger, fix the exit to a simple baseline) attributes the change to a specific role.
  • As the natural home of signal hygiene: cooldowns, one-position-at-a-time limits, and duplicate suppression live between setup and trigger, where they are stated once instead of being patched into every rule.
  • As the multi-timeframe skeleton: top-down systems map naturally onto the layers, filter from the higher frame, setup and trigger on the execution frame, which is the architecture behind most MTF alignment designs.
  • As alert plumbing: the state machine's transitions translate directly into notification tiers via alerts and webhooks, setup-armed as the heads-up, trigger as the action alert, exit events as management calls, one alert per state change instead of indicator spam.

The architecture vs neighboring composition frameworks

Confluence & Scoring Systems: Scoring systems aggregate evidence in parallel into one number; the architecture stages decisions in sequence with distinct roles. They compose: a score can serve as the filter or the setup condition, but the staged pipeline is what turns evidence into orderly execution.

Trend/range Classifiers: Classifiers are filter-slot machinery: they output the regime state the first layer consumes. The architecture is the frame that decides what a regime label is allowed to do, gate the system, never time the entry.

Signal Hygiene: Hygiene rules are the architecture's middleware: deduplication, cooldowns, and position limits enforced at the layer boundaries. The architecture gives them a single home; without it they end up copy-pasted into every condition and drift out of sync.

Concept family

Meta & Composition

28 concepts mapped · 28 in the Library

Filter-setup-trigger-exit Architecture FAQ

What is the difference between a setup and a trigger in a trading system?

A setup is a state: conditions have aligned and a possible trade is armed, often for a limited number of bars. A trigger is an event: the single, precisely defined occurrence that converts the armed setup into an order. Keeping them separate prevents entering just because context exists, and it lets the setup expire quietly when the trigger never comes, which is a common and correct outcome.

Why separate filters from entry signals in a strategy?

Because context and timing fail differently. A wrong filter puts you in the wrong environment; a wrong trigger gets the timing wrong inside the right environment, and the fixes are different. Separation also enables controlled experiments: hold three layers constant, vary the fourth, and you learn which component carries the edge. A single fused condition can only be tested as a lump, so its failures are hard to diagnose.

What is a setup expiry and why does it matter?

A bar count after which an armed, untriggered setup disarms. It encodes the fact that context decays: a pullback that reached the zone eight bars ago is no longer the same opportunity, and a trigger firing off that stale state is timing without context. Expiries also make backtests honest, since without them old setups accumulate and fire on unrelated events far downstream.

How do multi-timeframe systems map onto the architecture?

Cleanly, which is much of the architecture's appeal: the higher timeframe supplies the filter (trend state, level proximity, session), the execution timeframe hosts the setup and trigger, and the exit typically blends both, structural stops from the higher frame and management from the lower. The mapping keeps each timeframe's job explicit instead of letting them contaminate each other.

Where do cooldowns and re-entry rules belong?

At the layer boundaries, as hygiene middleware: a cooldown is a rule about when the setup layer may re-arm after an exit, not part of any indicator's logic. Stating it once at the boundary means every pathway obeys it, and changing it is one edit. The alternative, cooldown logic buried inside entry conditions, is how systems end up with rules nobody remembers interacting.

Can discretionary traders use this architecture?

It transfers almost unchanged as a decision checklist: am I allowed to trade (filter), is a candidate armed (setup), did my exact trigger print (trigger), and what is the exit plan before entry (exit). Many discretionary playbooks are exactly this pipeline written in prose, and the vocabulary helps diagnose errors, most impulse trades are triggers taken without setups, most stubborn losses exits improvised after the fact.

Turn Filter-setup-trigger-exit Architecture into a trading strategy.

Describe your Filter-setup-trigger-exit Architecture idea to Quant. It builds the strategy with you and backtests it on real data.