{
  "additionalProperties": false,
  "description": "End-of-day flat window: flat from ``at`` until that session's close.\n\nAt the window start, resolved against THAT DATE's session (``{\"close\": -5}``\nis 12:55 on a 13:00 half-day), it closes the position, filled from the\nexecution print at that instant, and cancels any entry still waiting to\nfill; until the close every entry signal is skipped. A clock start at or\nafter an early close is capped at one minute before that day's close, so the\nwindow exists on every session and no position is carried over a half day.\nOn a 24-hour market the close is the end of the UTC day.\n\nIt must be its own, whole exit: combined with other conditions or attached\nwith a size_frac it blocks readiness, as does a timed entry inside the\nwindow.",
  "properties": {
    "at": {
      "anyOf": [
        {
          "enum": [
            "open",
            "close"
          ],
          "type": "string"
        },
        {
          "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$",
          "type": "string"
        },
        {
          "$ref": "../defs.json#/$defs/OpenOffset"
        },
        {
          "$ref": "../defs.json#/$defs/CloseOffset"
        }
      ],
      "description": "When the flat window opens: \"close\" (one minute before the close), {\"close\": -N} minutes before the close, a clock time \"HH:MM\", or {\"open\": N} minutes after the open. The position stays flat from then until the session close.",
      "title": "At"
    },
    "kind": {
      "const": "flat_before_close",
      "default": "flat_before_close",
      "title": "Kind",
      "type": "string"
    }
  },
  "required": [
    "at"
  ],
  "title": "FlatBeforeCloseCondition",
  "type": "object"
}
