{
  "additionalProperties": false,
  "description": "Trigger on anchored VWAP z-score deviation for mean-reversion trades.\n\nFires when price deviates beyond a sigma threshold from AVWAP anchored at\nsession open or month start. Use for mean-reversion entries or exits.",
  "properties": {
    "anchor": {
      "enum": [
        "session_open",
        "week_open",
        "month_start"
      ],
      "title": "Anchor",
      "type": "string"
    },
    "direction": {
      "enum": [
        "long",
        "short",
        "exit"
      ],
      "title": "Direction",
      "type": "string"
    },
    "dist_sigma": {
      "maximum": 10.0,
      "minimum": 0.1,
      "title": "Dist Sigma",
      "type": "number"
    },
    "mode": {
      "default": "level",
      "description": "Firing mode. 'level' (default) = true every bar the z-score is beyond the threshold (CompareCondition). 'cross' = edge, fires once on the bar the z-score first crosses the threshold (CrossCondition). Not applicable to direction='exit'.",
      "enum": [
        "level",
        "cross"
      ],
      "title": "Mode",
      "type": "string"
    },
    "type": {
      "const": "avwap_reversion",
      "default": "avwap_reversion",
      "title": "Type",
      "type": "string"
    }
  },
  "required": [
    "anchor",
    "dist_sigma",
    "direction"
  ],
  "title": "AvwapReversionCondition",
  "type": "object"
}
