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 -
demandorsupply.
vs price_in_supply_demand_zone
- supply_demand_zone: closed-bar, deterministic, matches backtest
fills exactly. Use with the default
on_closeevaluation. - price_in_supply_demand_zone:
live-price, designed for
on_tickevaluation, 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.
