{
  "additionalProperties": false,
  "description": "Detect Fair Value Gap (FVG) zones -- 3-candle imbalance patterns.\n\nCreates zones in the zone registry when FVGs form. Entry triggers\nwhen price returns to an unfilled FVG zone.",
  "properties": {
    "direction": {
      "default": "both",
      "enum": [
        "bullish",
        "bearish",
        "both"
      ],
      "title": "Direction",
      "type": "string"
    },
    "fill_threshold": {
      "default": 0.5,
      "description": "Fill percentage (0-1) at which zone is considered filled",
      "maximum": 1.0,
      "minimum": 0.0,
      "title": "Fill Threshold",
      "type": "number"
    },
    "max_bars": {
      "anyOf": [
        {
          "minimum": 1,
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "default": 200,
      "description": "Zone expiry in bars",
      "title": "Max Bars"
    },
    "min_gap_pct": {
      "default": 0.1,
      "description": "Minimum gap size as % of price",
      "minimum": 0.0,
      "title": "Min Gap Pct",
      "type": "number"
    },
    "resolution": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Optional higher-timeframe override for this zone's lifecycle. Set to e.g. '4h' to create, fill, expire, and invalidate this zone on 4H bar closes. None = strategy primary timeframe.",
      "title": "Resolution"
    },
    "select": {
      "default": "any",
      "description": "How to pick among matching zones at trigger time. 'any' (default) fires when any zone overlaps the bar. 'nearest'/'most_recent'/'oldest' deterministically pick one zone \u2014 required when binding execution price via TriggeringZonePriceSpec (VIB-591).",
      "enum": [
        "nearest",
        "most_recent",
        "oldest",
        "any"
      ],
      "title": "Select",
      "type": "string"
    },
    "type": {
      "const": "fvg",
      "default": "fvg",
      "title": "Type",
      "type": "string"
    }
  },
  "title": "FairValueGapCondition",
  "type": "object"
}
