{
  "$defs": {
    "BandSpec": {
      "additionalProperties": false,
      "description": "Band specification for technical indicators.\n\nIMPORTANT: 'length' is in BARS, not days. Effective lookback horizon =\ntf \u00d7 length (e.g., 720 bars \u00d7 1h \u2248 30 days, 24 bars \u00d7 1h \u2248 1 day).\nMaximum length is 400 bars.",
      "properties": {
        "anchor": {
          "anyOf": [
            {
              "enum": [
                "session",
                "week",
                "month"
              ],
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Anchor point for AVWAP-based bands (session/week/month supported)",
          "title": "Anchor"
        },
        "band": {
          "enum": [
            "bollinger",
            "keltner",
            "donchian",
            "vwap_band"
          ],
          "title": "Band",
          "type": "string"
        },
        "length": {
          "description": "Number of BARS for lookback. Must be >=1 for bollinger/keltner/donchian; vwap_band is anchor-driven and accepts 0.",
          "maximum": 400,
          "minimum": 0,
          "title": "Length",
          "type": "integer"
        },
        "mult": {
          "default": 2.0,
          "description": "Standard deviation multiplier",
          "maximum": 5.0,
          "minimum": 0.1,
          "title": "Mult",
          "type": "number"
        }
      },
      "required": [
        "band",
        "length"
      ],
      "title": "BandSpec",
      "type": "object"
    }
  },
  "additionalProperties": false,
  "description": "Detect price re-entering a band after being outside.\n\nFires when price was outside the specified band edge and comes back inside.\nUse for mean-reversion entries after an overextension.",
  "properties": {
    "band": {
      "$ref": "#/$defs/BandSpec"
    },
    "edge": {
      "enum": [
        "upper",
        "lower"
      ],
      "title": "Edge",
      "type": "string"
    },
    "type": {
      "const": "band_reentry",
      "default": "band_reentry",
      "title": "Type",
      "type": "string"
    }
  },
  "required": [
    "band",
    "edge"
  ],
  "title": "BandReentryCondition",
  "type": "object"
}
