{
  "additionalProperties": false,
  "description": "Price above N-bar high/low \u2014 level/state-based, true on every bar while condition holds.\n\nFires on every bar where price exceeds the highest high (or lowest low) of the last N bars.\nThis is a persistent state condition, not a transition. For an edge-based version that fires\nonce on the bar the crossing occurs, use cross with rhs={type:swing}.",
  "properties": {
    "buffer_bps": {
      "default": 0,
      "maximum": 200,
      "minimum": 0,
      "title": "Buffer Bps",
      "type": "number"
    },
    "direction": {
      "default": "above",
      "description": "Breakout direction: 'above' = price > N-bar high, 'below' = price < N-bar low",
      "enum": [
        "above",
        "below"
      ],
      "title": "Direction",
      "type": "string"
    },
    "lookback_bars": {
      "maximum": 1000,
      "minimum": 2,
      "title": "Lookback Bars",
      "type": "integer"
    },
    "mode": {
      "default": "cross",
      "description": "Firing mode. 'cross' (default) = edge, fires once on the bar close first crosses the prior N-bar extreme (CrossCondition). 'level' = true every bar close is beyond the prior N-bar extreme (CompareCondition).",
      "enum": [
        "level",
        "cross"
      ],
      "title": "Mode",
      "type": "string"
    },
    "type": {
      "const": "breakout",
      "default": "breakout",
      "title": "Type",
      "type": "string"
    }
  },
  "required": [
    "lookback_bars"
  ],
  "title": "BreakoutCondition",
  "type": "object"
}
