Skip to content

Setup Conditions

The Six Required Conditions

A valid V1 setup requires all six conditions to be true simultaneously. If any single condition fails, the result is no-trade. There are no partial setups.

Condition 1: Daily Bias Non-Zero

Source: Bias AI table

The daily bias must be either bullish or bearish. A neutral (0) bias -- which occurs when an outside bar closes inside the previous range -- means the market has no directional conviction. The strategy does not guess.

PASS: daily_bias == "bullish" OR daily_bias == "bearish"
FAIL: daily_bias == "neutral"

Condition 2: Hunt Locked

Source: Session Hunt AI

One side of the session range must be swept. The hunt state must be either HUNT_HIGH (high swept) or HUNT_LOW (low swept). If both sides are swept without a re-extension, the hunt is INVALID.

PASS: hunt.side == "HUNT_HIGH" OR hunt.side == "HUNT_LOW"
FAIL: hunt.side == "INVALID" OR hunt.side == null

A null hunt means the session range has not yet formed or no sweeps have occurred. This is a waiting state, not an invalidation -- the strategy continues scanning until a hunt locks or the entry window closes.

Condition 3: Hunt Aligns With Bias

Source: Bias AI + Session Hunt AI (combined)

The hunt direction must be logically consistent with the daily bias. The ICT model states that price sweeps one side of a range (taking liquidity) before moving toward the draw on liquidity on the opposite side.

Daily Bias Required Hunt Logic
Bullish (DOL = PDH) HUNT_LOW Price sweeps the low (takes sell-side liquidity), then draws up to PDH
Bearish (DOL = PDL) HUNT_HIGH Price sweeps the high (takes buy-side liquidity), then draws down to PDL
PASS: (bias == "bullish" AND hunt == "HUNT_LOW") OR
      (bias == "bearish" AND hunt == "HUNT_HIGH")
FAIL: Any other combination

A mismatch (e.g., bullish bias but HUNT_HIGH) means the market swept the wrong side relative to the expected draw. This is not a tradeable setup under the V1 model.

Condition 4: Unspent OB in Path

Source: OB AI

At least one unspent order block must exist in the path between the current price and the DOL target. The OB must match the setup direction (bullish OB for long, bearish OB for short).

Setup Direction OB Type Required Position Relative to Price
Long Bullish OB Below current price (price retraces down to OB, then moves up to PDH)
Short Bearish OB Above current price (price retraces up to OB, then moves down to PDL)

Unspent means the OB boundary lines are drawn with a solid line style. A dotted line style indicates the OB has been partially mitigated (spent). Deleted lines indicate full mitigation.

PASS: At least one OB where:
      - ob.direction matches setup direction
      - ob.spent == false (solid line style)
      - ob is between current price and DOL target
FAIL: No qualifying OBs exist

Condition 5: Entry Window Active

Source: System clock (derived from configuration)

The current time must fall within the configured entry window. The strategy does not enter positions outside of high-liquidity session hours.

Session Mode Entry Window (ET)
NY (default) 07:00 -- 15:00
London 02:00 -- 07:00
PASS: current_time >= entry_window_start AND current_time <= entry_window_end
FAIL: current_time outside entry window

Time before the window opens is a waiting state. Time after the window closes is an EOD invalidation (see Invalidation).

Condition 6: Price at or Near OB Zone

Source: OB AI (price levels + ATR banner)

The current price must be within ATR distance of the target order block zone. This ensures the strategy does not flag a setup when the OB is far from price and the entry is not yet actionable.

distance = abs(current_price - nearest_ob_edge)
atr_threshold = ob_ai.atr.stop_points

PASS: distance <= atr_threshold
FAIL: distance > atr_threshold

When price is beyond ATR distance but all other conditions are met, the setup is flagged as pending -- valid but not yet actionable. The strategy continues scanning until price approaches the OB or the setup invalidates.


Setup Validation Pipeline

The following flowchart shows the complete validation sequence. Conditions are evaluated in order; early exits prevent unnecessary indicator reads.

flowchart TD
    START([Scan Triggered]) --> C1{Condition 1:<br/>Daily bias<br/>non-zero?}
    C1 -->|No: neutral| NT1[NO TRADE<br/>Reason: neutral_bias]
    C1 -->|Yes| C2{Condition 2:<br/>Hunt locked?}
    C2 -->|No: INVALID| NT2[NO TRADE<br/>Reason: invalid_hunt]
    C2 -->|No: null| WAIT1[WAITING<br/>No hunt yet]
    C2 -->|Yes| C3{Condition 3:<br/>Hunt aligns<br/>with bias?}
    C3 -->|No| NT3[NO TRADE<br/>Reason: hunt_bias_mismatch]
    C3 -->|Yes| C4{Condition 4:<br/>Unspent OB<br/>in path?}
    C4 -->|No| NT4[NO TRADE<br/>Reason: no_ob_in_path]
    C4 -->|Yes| C5{Condition 5:<br/>Entry window<br/>active?}
    C5 -->|Before window| WAIT2[WAITING<br/>Pre-session]
    C5 -->|After window| NT5[NO TRADE<br/>Reason: past_eod_cutoff]
    C5 -->|Yes| C6{Condition 6:<br/>Price near OB?}
    C6 -->|No| PENDING[PENDING<br/>Setup valid,<br/>price not at OB]
    C6 -->|Yes| VALID([SETUP VALID<br/>Compute confluence,<br/>entry levels,<br/>risk/reward])

Output States

The validation pipeline produces one of four states:

State Meaning setup_valid Action
VALID All 6 conditions met true Compute full decision block in StrategyFlags
PENDING Conditions 1-5 met, price not at OB yet false Flag as pending, continue scanning
WAITING Pre-conditions met but hunt not locked or outside entry window false Continue scanning until state changes
NO TRADE One or more hard conditions failed false Populate no_trade_reasons array, stop scanning for this session direction

Condition Evaluation Order Rationale

The conditions are ordered by cost and permanence:

  1. Bias (cheapest read, changes only on daily candle close)
  2. Hunt (single label read, changes infrequently)
  3. Hunt-bias alignment (pure logic, no additional reads)
  4. OB existence (requires box + line scan, moderate cost)
  5. Entry window (system clock, zero cost)
  6. Price proximity (requires current price vs. OB levels)

This ordering minimizes MCP calls when early conditions fail.