Objects

Setup

One current pattern on a ticker: the lines to draw, the trigger, stop and target, and the track record behind them.

One current pattern on a ticker: the lines to draw, the trigger, stop and target, and the track record behind them. Everything is read from the last nightly run; nothing is computed per request.

Fields

FieldTypeDescription
setup_idstringIdentifier of this pattern occurrence in the current nightly book. Pass it as setup_id to the chart.png route. It is stable while the setup stays current and is not valid across nights, so re-read the patterns when the chart route answers setup_not_found.
lineage_idstring · nullableKey of the candidate lineage this occurrence belongs to, shared by the revisions of the same detected pattern. Null when the stored candidate carries none.
symbolstringExchange symbol, upper case.
intervalstringBar interval. Always D: daily bars. Always D.
familystring (enum)The display family of the pattern, one of rising_wedge, falling_wedge, bullish_pennant, bearish_pennant, triangle. One of rising_wedge, falling_wedge, bullish_pennant, bearish_pennant, triangle.
family_labelstringHuman-readable family name, for example "Falling wedge".
pattern_typestring · nullableThe detector's own pattern type, which can be more specific than family (for example a triangle subtype). Null when the artifact carries none.
directionstring (enum) · nullableThe side the pattern is expected to resolve to: bullish or bearish. Null when the pattern has no single direction, such as a symmetrical triangle that carries a plan for each side. One of bullish, bearish.
statusstringLifecycle stage of the setup: forming until the trigger rule fires, in_progress once a daily close has triggered it (entered is then present). Defaults to forming when the artifact stores no stage.
pattern_startdate · nullableSession date of the first bar of the pattern, as an ISO date. Null when unknown.
pattern_enddate · nullableSession date of the last bar of the pattern geometry, where the lines end, as an ISO date. Null when unknown.
as_of_sessiondate · nullableThe session this setup is valid for, as an ISO date; the same value as the envelope's as_of_session.
last_closenumber · nullableThe last close in the stored candle tail, in dollars, so a caller can place the trigger relative to price without another quote. Null when no quote is stored.
price_scalestringAlways log: the lines are straight in log price, so draw them on a log-scale price axis. Always log.
linesobjectThe two boundary lines of the pattern.
lines.upperobject · nullableThe upper boundary. Bullish plans trigger on a daily close above it. Null when the stored pattern has no upper line.
lines.upper.startobjectThe earlier endpoint: the session and price where the line begins.
lines.upper.start.datedateSession date of the bar, as an ISO date.
lines.upper.start.pricenumberPrice in dollars, rounded to four decimals.
lines.upper.endobjectThe later endpoint, at the end of the pattern geometry. The trigger price sits on the extension of the line past this point.
lines.upper.end.datedateSession date of the bar, as an ISO date.
lines.upper.end.pricenumberPrice in dollars, rounded to four decimals.
lines.upper.touch_countinteger · nullableHow many bars touched the line, as the detector counted them; the length of touches when no count is stored.
lines.upper.touchesarray of objectThe bars that touched the line, in the order the detector recorded them, so a charting tool can reproduce the fit. May be empty.
lines.upper.touches[].datedateSession date of the touching bar, as an ISO date.
lines.upper.touches[].pricenumber · nullableThe bar high (upper line) or low (lower line) in dollars. Null when that bar is not in the stored candle tail.
lines.lowerobject · nullableThe lower boundary. Bearish plans trigger on a daily close below it. Null when the stored pattern has no lower line.
lines.lower.startobjectThe earlier endpoint: the session and price where the line begins.
lines.lower.start.datedateSession date of the bar, as an ISO date.
lines.lower.start.pricenumberPrice in dollars, rounded to four decimals.
lines.lower.endobjectThe later endpoint, at the end of the pattern geometry. The trigger price sits on the extension of the line past this point.
lines.lower.end.datedateSession date of the bar, as an ISO date.
lines.lower.end.pricenumberPrice in dollars, rounded to four decimals.
lines.lower.touch_countinteger · nullableHow many bars touched the line, as the detector counted them; the length of touches when no count is stored.
lines.lower.touchesarray of objectThe bars that touched the line, in the order the detector recorded them, so a charting tool can reproduce the fit. May be empty.
lines.lower.touches[].datedateSession date of the touching bar, as an ISO date.
lines.lower.touches[].pricenumber · nullableThe bar high (upper line) or low (lower line) in dollars. Null when that bar is not in the stored candle tail.
trigger_rulestring · nullableThe trigger rule in one sentence, chosen by direction: a daily close above the upper line, below the lower line, or through either line when the pattern carries a plan per side. Always present.
plansarray of objectOne trade plan per direction the pattern can resolve in: usually one, two for a symmetrical triangle. Empty when the stored candidate has no eligible branch.
plans[].directionstring (enum)The side this plan trades: bullish (a close above the upper line) or bearish (a close below the lower line). One of bullish, bearish.
plans[].trigger_pricenumber · nullableThe daily close that confirms the pattern, in dollars, as of the last session. It sits on the boundary line, so it moves a little each session. Null when the stored branch has none.
plans[].stop_pricenumber · nullableThe stop level in dollars. The backtest freezes it at entry and fills it on a touch, or at the open after an adverse gap. Null when the stored branch has none.
plans[].target_pricenumber · nullableThe measured-move target in dollars: the pattern height projected from the trigger. Null when the stored branch has none.
track_recordobjectThe backtest records behind this setup, at family scope and at ticker scope.
track_record.familyTrack recordThe family's record over the served universe. Null when no record is sealed for the family.
track_record.tickerTrack recordThe record of this family on this ticker. Null when the ticker has no resolved history for the family, or too few trades to display.
enteredobjectThe fill, present only once the trigger has fired (status in_progress). Absent while forming.
entered.entry_datedate · nullableSession date of the bar that triggered the setup, as an ISO date. Null when the artifact stores no entry time.
entered.entry_pricenumber · nullableThe entry price in dollars, recorded when the trigger fired.
entered.stop_pricenumber · nullableThe stop in dollars, frozen at entry.
entered.target_pricenumber · nullableThe target in dollars, fixed at entry.

Example

Setup
{
  "setup_id": "NVDA:D:falling_wedge:1",
  "lineage_id": "lineage-1",
  "symbol": "NVDA",
  "interval": "D",
  "family": "falling_wedge",
  "family_label": "Falling wedge",
  "pattern_type": "falling_wedge",
  "direction": "bullish",
  "status": "forming",
  "pattern_start": "2026-08-08",
  "pattern_end": "2026-09-07",
  "as_of_session": "2026-09-25",
  "last_close": 101.5,
  "price_scale": "log",
  "lines": {
    "upper": {
      "start": {
        "date": "2026-08-08",
        "price": 110
      },
      "end": {
        "date": "2026-09-07",
        "price": 104
      },
      "touch_count": 3,
      "touches": [
        {
          "date": "2026-08-08",
          "price": 111.2
        }
      ]
    },
    "lower": {
      "start": {
        "date": "2026-08-08",
        "price": 90
      },
      "end": {
        "date": "2026-09-07",
        "price": 98
      },
      "touch_count": 2,
      "touches": []
    }
  },
  "trigger_rule": "A daily close above the upper line; the trigger price moves with the line.",
  "plans": [
    {
      "direction": "bullish",
      "trigger_price": 105.25,
      "stop_price": 96,
      "target_price": 120
    }
  ],
  "track_record": {
    "family": {
      "scope": "family",
      "family": "falling_wedge",
      "symbol": null,
      "win_rate_pct": 54,
      "sample_size": 1287,
      "wins": 695,
      "losses": 592,
      "avg_win_pct": 8.1,
      "avg_loss_pct": -4.2,
      "median_win_pct": 6.3,
      "avg_trade_pct": 2.4,
      "avg_r": 0.41,
      "expected_r": 0.41,
      "profit_factor": 1.61,
      "avg_hold_bars": 11.2,
      "backtest_range": [
        "2006-09-25",
        "2026-09-25"
      ],
      "measured": "Every detector-confirmed breakout … open trades are excluded.",
      "summary": "Falling wedge: 1,287 resolved trades from 2006-09-25 to 2026-09-25; 54% reached the target, average win +8.1%, average loss -4.2%, median win +6.3%."
    },
    "ticker": null
  }
}

Where it appears