{
  "version": 1,
  "scope": "Three NEW reproducible H1 teaching cases. The older real-patterns gallery has different cases; its raw OHLC are not included here.",
  "source": "ICMarketsSC-Demo / saved MT5 Bid history; read-only source export",
  "time_basis": "Original MT5 bar openings. Server offset unverified. Nominal bar end is an earliest availability bound, not a measured receipt time.",
  "price_arithmetic": "Integer source points; EURUSD/GBPUSD 5 digits, USDJPY 3. One FX pip is 10 source points. Exact rational arithmetic for lines.",
  "swing_rule": "2+2: strict left, non-strict right; ties retain earlier candidate. Points that are both high and low are excluded. Consecutive same-kind confirmed pivots retain the more extreme known point, ties retain earlier.",
  "selection_period": "2026-01-01 through 2026-09-30, original MT5 time",
  "selection_order": "First chronological qualifying assessment under each rule. Candidate and context cases do not filter later outcomes. Case C deliberately filters for invalidation within the next eight records, to teach failure; it estimates no frequency.",
  "candidate_rule": "Last five previously available alternating pivots L,H,L,H,L; first four have rising highs/lows. Candidate peak > both left Highs, >= first right High; only one right record closed. Peaks within 10 pips, valley depth at least 10 pips, maximum preceding span 42 records. Assessment Close above valley.",
  "triangle_rule": "Last four available alternating pivots form falling upper/rising lower boundaries. Prior four pivots do not meet HH/HL. Frozen lines, all closes from anchor availability until prior bar within boundaries. First upward closing break within 10 records of last anchor availability and before apex; apex no more than 60 records ahead. Context span <=52 records.",
  "counterexample_rule": "Available L,H,L,H,L,H with first four HH/HL; final peaks within 10 pips and valley at least 10 pips below smaller peak. First Close below valley after point availability, with preceding Close at/above. Span <=44 records. Deliberately first case followed within eight records by Close strictly above valley. Equal Close does not invalidate.",
  "sources": [
    {
      "file": "GBPUSD-H1.csv",
      "sha256": "5289cd58e0fb935e0c65f0f57ac5047b4f27db5f8e6ed29fe937c559baba9df9",
      "public_url": "/technical-analysis/trading-automation/data/sources/GBPUSD-H1.csv"
    },
    {
      "file": "EURUSD-H1.csv",
      "sha256": "0f58687cc1be679669de57ce3c128d708a51e415f8a2a7c614909fae97a49fef",
      "public_url": "/technical-analysis/trading-automation/data/sources/EURUSD-H1.csv"
    },
    {
      "file": "USDJPY-H1.csv",
      "sha256": "143ed1ae9c90c1da7890bbf858911822e8590999180ff4a765689a4718d3530d",
      "public_url": "/technical-analysis/trading-automation/data/sources/USDJPY-H1.csv"
    }
  ],
  "cases": [
    {
      "id": "ta25-pattern-candidate",
      "source": "GBPUSD-H1.csv",
      "digits": 5,
      "kind": "candidate",
      "start": 1248,
      "assessment": 1276,
      "end": 1284,
      "anchors": [
        {
          "i": 1251,
          "kind": "L",
          "price": 133707,
          "known": 1253
        },
        {
          "i": 1255,
          "kind": "H",
          "price": 133913,
          "known": 1257
        },
        {
          "i": 1257,
          "kind": "L",
          "price": 133772,
          "known": 1259
        },
        {
          "i": 1261,
          "kind": "H",
          "price": 134132,
          "known": 1263
        },
        {
          "i": 1266,
          "kind": "L",
          "price": 133661,
          "known": 1268
        }
      ],
      "candidate": {
        "i": 1275,
        "price": 134088,
        "kind": "H",
        "earliest_known": 1277
      },
      "boundary": 133661,
      "tolerance_points": 100,
      "as_of_bar_open": "2026-01-19 03:00",
      "nominal_close": "2026-01-19 04:00",
      "before_csv": "ta25-pattern-candidate-before.csv",
      "before_sha256": "2810494e20c7f014b0058499091e08e7878ff061a93bbcd6cf2567561eff716d",
      "after_csv": "ta25-pattern-candidate-after.csv",
      "after_sha256": "06b06f8d282b10b293a6eae216d842a396acd5250b42c5b946c2c665e5d1828c",
      "anchor_observations": [
        {
          "i": 1251,
          "kind": "L",
          "price": 133707,
          "known": 1253,
          "bar_open": "2026-01-16 02:00",
          "nominal_known_after": "2026-01-16 05:00"
        },
        {
          "i": 1255,
          "kind": "H",
          "price": 133913,
          "known": 1257,
          "bar_open": "2026-01-16 06:00",
          "nominal_known_after": "2026-01-16 09:00"
        },
        {
          "i": 1257,
          "kind": "L",
          "price": 133772,
          "known": 1259,
          "bar_open": "2026-01-16 08:00",
          "nominal_known_after": "2026-01-16 11:00"
        },
        {
          "i": 1261,
          "kind": "H",
          "price": 134132,
          "known": 1263,
          "bar_open": "2026-01-16 12:00",
          "nominal_known_after": "2026-01-16 15:00"
        },
        {
          "i": 1266,
          "kind": "L",
          "price": 133661,
          "known": 1268,
          "bar_open": "2026-01-16 17:00",
          "nominal_known_after": "2026-01-16 20:00"
        }
      ],
      "lines": {
        "neckline": {
          "equation": "y(i) = 133661",
          "price_source_points": 133661
        }
      }
    },
    {
      "id": "ta25-pattern-context",
      "source": "USDJPY-H1.csv",
      "digits": 3,
      "kind": "triangle-context",
      "start": 1030,
      "assessment": 1068,
      "end": 1076,
      "anchors": [
        {
          "i": 1054,
          "kind": "L",
          "price": 156115,
          "known": 1056
        },
        {
          "i": 1059,
          "kind": "H",
          "price": 156796,
          "known": 1061
        },
        {
          "i": 1063,
          "kind": "L",
          "price": 156240,
          "known": 1065
        },
        {
          "i": 1065,
          "kind": "H",
          "price": 156479,
          "known": 1067
        }
      ],
      "context_anchors": [
        {
          "i": 1033,
          "kind": "L",
          "price": 156681,
          "known": 1035
        },
        {
          "i": 1039,
          "kind": "H",
          "price": 157299,
          "known": 1041
        },
        {
          "i": 1047,
          "kind": "L",
          "price": 156465,
          "known": 1049
        },
        {
          "i": 1048,
          "kind": "H",
          "price": 156978,
          "known": 1050
        }
      ],
      "upper_anchors": [
        {
          "i": 1059,
          "kind": "H",
          "price": 156796,
          "known": 1061
        },
        {
          "i": 1065,
          "kind": "H",
          "price": 156479,
          "known": 1067
        }
      ],
      "lower_anchors": [
        {
          "i": 1054,
          "kind": "L",
          "price": 156115,
          "known": 1056
        },
        {
          "i": 1063,
          "kind": "L",
          "price": 156240,
          "known": 1065
        }
      ],
      "apex_record": "1282867/1201",
      "uptrend_context": false,
      "as_of_bar_open": "2026-01-06 11:00",
      "nominal_close": "2026-01-06 12:00",
      "before_csv": "ta25-pattern-context-before.csv",
      "before_sha256": "0e34ace9908391d7af39925edeb9a16aa7d7b04302c621ec2a88d32fa21f3f8e",
      "after_csv": "ta25-pattern-context-after.csv",
      "after_sha256": "2a7ab9ebeccc372661776aedf471eb1403e33d0c4ab45802651bda23e1e031b4",
      "anchor_observations": [
        {
          "i": 1054,
          "kind": "L",
          "price": 156115,
          "known": 1056,
          "bar_open": "2026-01-05 21:00",
          "nominal_known_after": "2026-01-06 00:00"
        },
        {
          "i": 1059,
          "kind": "H",
          "price": 156796,
          "known": 1061,
          "bar_open": "2026-01-06 02:00",
          "nominal_known_after": "2026-01-06 05:00"
        },
        {
          "i": 1063,
          "kind": "L",
          "price": 156240,
          "known": 1065,
          "bar_open": "2026-01-06 06:00",
          "nominal_known_after": "2026-01-06 09:00"
        },
        {
          "i": 1065,
          "kind": "H",
          "price": 156479,
          "known": 1067,
          "bar_open": "2026-01-06 08:00",
          "nominal_known_after": "2026-01-06 11:00"
        },
        {
          "i": 1033,
          "kind": "L",
          "price": 156681,
          "known": 1035,
          "bar_open": "2026-01-05 00:00",
          "nominal_known_after": "2026-01-05 03:00"
        },
        {
          "i": 1039,
          "kind": "H",
          "price": 157299,
          "known": 1041,
          "bar_open": "2026-01-05 06:00",
          "nominal_known_after": "2026-01-05 09:00"
        },
        {
          "i": 1047,
          "kind": "L",
          "price": 156465,
          "known": 1049,
          "bar_open": "2026-01-05 14:00",
          "nominal_known_after": "2026-01-05 17:00"
        },
        {
          "i": 1048,
          "kind": "H",
          "price": 156978,
          "known": 1050,
          "bar_open": "2026-01-05 15:00",
          "nominal_known_after": "2026-01-05 18:00"
        }
      ],
      "lines": {
        "upper": {
          "origin_index": 1059,
          "origin_price_points": 156796,
          "slope_source_points_per_record": "-317/6",
          "equation": "y(i) = 156796 + (-317/6) * (i - 1059)",
          "frozen_after_record": 1067
        },
        "lower": {
          "origin_index": 1054,
          "origin_price_points": 156115,
          "slope_source_points_per_record": "125/9",
          "equation": "y(i) = 156115 + (125/9) * (i - 1054)",
          "frozen_after_record": 1067
        }
      }
    },
    {
      "id": "ta25-pattern-invalidation",
      "source": "EURUSD-H1.csv",
      "digits": 5,
      "kind": "double-top-failure",
      "start": 1930,
      "assessment": 1954,
      "end": 1962,
      "anchors": [
        {
          "i": 1933,
          "kind": "L",
          "price": 117710,
          "known": 1935
        },
        {
          "i": 1939,
          "kind": "H",
          "price": 118143,
          "known": 1941
        },
        {
          "i": 1944,
          "kind": "L",
          "price": 117999,
          "known": 1946
        },
        {
          "i": 1947,
          "kind": "H",
          "price": 118289,
          "known": 1949
        },
        {
          "i": 1950,
          "kind": "L",
          "price": 118125,
          "known": 1952
        },
        {
          "i": 1951,
          "kind": "H",
          "price": 118226,
          "known": 1953
        }
      ],
      "boundary": 118125,
      "tolerance_points": 100,
      "invalidation": 1960,
      "selection_uses_future_outcome": true,
      "as_of_bar_open": "2026-02-26 10:00",
      "nominal_close": "2026-02-26 11:00",
      "before_csv": "ta25-pattern-invalidation-before.csv",
      "before_sha256": "de62b71e11e126104320a19e2080d02639426dd81285cfbf76caf0e9b99c8b24",
      "after_csv": "ta25-pattern-invalidation-after.csv",
      "after_sha256": "31030f07d4b328950862a6a9f00595398096ec79e62b658fdcbe8ac30c8d706b",
      "anchor_observations": [
        {
          "i": 1933,
          "kind": "L",
          "price": 117710,
          "known": 1935,
          "bar_open": "2026-02-25 13:00",
          "nominal_known_after": "2026-02-25 16:00"
        },
        {
          "i": 1939,
          "kind": "H",
          "price": 118143,
          "known": 1941,
          "bar_open": "2026-02-25 19:00",
          "nominal_known_after": "2026-02-25 22:00"
        },
        {
          "i": 1944,
          "kind": "L",
          "price": 117999,
          "known": 1946,
          "bar_open": "2026-02-26 00:00",
          "nominal_known_after": "2026-02-26 03:00"
        },
        {
          "i": 1947,
          "kind": "H",
          "price": 118289,
          "known": 1949,
          "bar_open": "2026-02-26 03:00",
          "nominal_known_after": "2026-02-26 06:00"
        },
        {
          "i": 1950,
          "kind": "L",
          "price": 118125,
          "known": 1952,
          "bar_open": "2026-02-26 06:00",
          "nominal_known_after": "2026-02-26 09:00"
        },
        {
          "i": 1951,
          "kind": "H",
          "price": 118226,
          "known": 1953,
          "bar_open": "2026-02-26 07:00",
          "nominal_known_after": "2026-02-26 10:00"
        }
      ],
      "lines": {
        "neckline": {
          "equation": "y(i) = 118125",
          "price_source_points": 118125
        }
      }
    }
  ],
  "no_execution_results": true,
  "trading_calls": 0,
  "index_basis": "All i/known/start/assessment/end indices are zero-based rows of the complete source CSV, excluding its header. known is the second right-hand record; the point is eligible only after that record closes."
}
