Conditions

Closed bar inside S/D zone

Closed-bar boolean - did this bar's close land inside the active zone?. Internal type - `supply_demand_zone`.

1 min readUpdated Jun 19, 2026

supply_demand_zone returns true when the closed bar's close sits inside the nearest active zone. It reads a precomputed flag from the Supply/Demand indicator.

Shape

{ "type": "supply_demand_zone", "zone_type": "demand" }

Params

  • zone type - demand or supply.

vs price_in_supply_demand_zone

  • supply_demand_zone: closed-bar, deterministic, matches backtest fills exactly. Use with the default on_close evaluation.
  • price_in_supply_demand_zone: live-price, designed for on_tick evaluation, fires intra-bar.

Pick one or the other, not both. They will conflict on bars where the close lands inside the zone but the wick didn't (or vice versa).

Pitfalls

  • Requires the SUPPLY_DEMAND indicator to be declared.
  • Closed-bar evaluation means you miss zone touches that happened intra-bar and got rejected before close.
Closed bar inside S/D zone | Help Center | LucraX · LucraX