{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/traderspy-app/json-schema/traderspy-app-condition-schema.json",
  "title": "Condition",
  "x-generated": "2026-11-27",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/traderspy-app-openapi.json#/components/schemas/Condition",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "metric",
    "op",
    "value"
  ],
  "properties": {
    "metric": {
      "type": "string",
      "enum": [
        "rsi",
        "stochastic",
        "cci",
        "mfi",
        "williamsR",
        "adx",
        "roc",
        "macdHistogram",
        "atrPct",
        "volumeRatio",
        "bbPercentB",
        "bbWidthPct",
        "priceVsEma",
        "emaSpread",
        "supertrend",
        "changePct",
        "price"
      ]
    },
    "op": {
      "type": "string",
      "enum": [
        "lt",
        "gt",
        "crossAbove",
        "crossBelow"
      ]
    },
    "value": {
      "type": "number"
    },
    "period": {
      "type": "integer",
      "minimum": 2,
      "maximum": 200
    },
    "period2": {
      "type": "integer",
      "minimum": 2,
      "maximum": 200
    }
  }
}