{
  "additionalProperties": false,
  "description": "Detect candlestick patterns (hammer, engulfing, doji, morning star, etc.).\n\nFires on the bar where the pattern completes. Supports single-bar, two-bar,\nand three-bar patterns with optional quality filters. Use for reversal or continuation entries.",
  "properties": {
    "atr_period": {
      "default": 14,
      "description": "ATR period for min_range_atr filter",
      "maximum": 100,
      "minimum": 5,
      "title": "Atr Period",
      "type": "integer"
    },
    "max_body_pct": {
      "anyOf": [
        {
          "maximum": 1.0,
          "minimum": 0.0,
          "type": "number"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Max body as fraction of total range. Hammer default: 0.33, Doji default: 0.1",
      "title": "Max Body Pct"
    },
    "max_opposite_wick_pct": {
      "anyOf": [
        {
          "maximum": 1.0,
          "minimum": 0.0,
          "type": "number"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Max wick on the opposite side as fraction of range. Default: 0.1. Only applies to hammer/shooting_star/inverted_hammer.",
      "title": "Max Opposite Wick Pct"
    },
    "min_body_pct": {
      "anyOf": [
        {
          "maximum": 1.0,
          "minimum": 0.0,
          "type": "number"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Min body as fraction of total range. Engulfing default: 0.5",
      "title": "Min Body Pct"
    },
    "min_range_atr": {
      "anyOf": [
        {
          "minimum": 0.0,
          "type": "number"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Min candle range as multiple of ATR. Filters noise candles. Default: 0.5",
      "title": "Min Range Atr"
    },
    "min_wick_ratio": {
      "anyOf": [
        {
          "minimum": 0.0,
          "type": "number"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Min lower (hammer) or upper (shooting_star) wick as multiple of body. Default: 2.0. Only applies to hammer/shooting_star/inverted_hammer.",
      "title": "Min Wick Ratio"
    },
    "pattern": {
      "description": "Candlestick pattern to detect. Single-bar: hammer, inverted_hammer, shooting_star, doji, dragonfly_doji, gravestone_doji, spinning_top, marubozu. Two-bar: bullish_engulfing, bearish_engulfing, harami, harami_cross, inside_bar. Three-bar: morning_star, evening_star, piercing_line, dark_cloud_cover, three_white_soldiers, three_black_crows.",
      "enum": [
        "hammer",
        "inverted_hammer",
        "shooting_star",
        "doji",
        "dragonfly_doji",
        "gravestone_doji",
        "spinning_top",
        "marubozu",
        "bullish_engulfing",
        "bearish_engulfing",
        "harami",
        "harami_cross",
        "inside_bar",
        "morning_star",
        "evening_star",
        "piercing_line",
        "dark_cloud_cover",
        "three_white_soldiers",
        "three_black_crows"
      ],
      "title": "Pattern",
      "type": "string"
    },
    "type": {
      "const": "candle_pattern",
      "default": "candle_pattern",
      "title": "Type",
      "type": "string"
    }
  },
  "required": [
    "pattern"
  ],
  "title": "CandlePatternCondition",
  "type": "object"
}
