{
  "additionalProperties": false,
  "description": "Detect session opening gaps and trigger gap-fade or gap-go entries.\n\nFires during a configured time window when a gap is detected at session open.\nUse for intraday gap-fill or gap-continuation strategies.",
  "properties": {
    "direction": {
      "enum": [
        "long",
        "short"
      ],
      "title": "Direction",
      "type": "string"
    },
    "min_gap_pct": {
      "default": 0.5,
      "minimum": 0.0,
      "title": "Min Gap Pct",
      "type": "number"
    },
    "mode": {
      "enum": [
        "gap_fade",
        "gap_go"
      ],
      "title": "Mode",
      "type": "string"
    },
    "session": {
      "enum": [
        "us",
        "eu",
        "asia"
      ],
      "title": "Session",
      "type": "string"
    },
    "type": {
      "const": "gap",
      "default": "gap",
      "title": "Type",
      "type": "string"
    },
    "window_end_hour": {
      "anyOf": [
        {
          "maximum": 23,
          "minimum": 0,
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Optional time-of-day filter end, in the session's local time zone. See window_start_hour for details.",
      "title": "Window End Hour"
    },
    "window_end_minute": {
      "default": 0,
      "maximum": 59,
      "minimum": 0,
      "title": "Window End Minute",
      "type": "integer"
    },
    "window_start_hour": {
      "anyOf": [
        {
          "maximum": 23,
          "minimum": 0,
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Optional time-of-day filter, in the SESSION'S LOCAL time zone (US session = America/New_York, EU = Europe/London, Asia = Asia/Tokyo). Omit to allow firing at session open regardless of clock time. Both window_start_hour and window_end_hour must be set together to apply a window.",
      "title": "Window Start Hour"
    }
  },
  "required": [
    "session",
    "mode",
    "direction"
  ],
  "title": "GapCondition",
  "type": "object"
}
