{
  "note": "Calculation record for every number in index.html (entries, shown through <span data-ledger=\"key\">) and in the five PNGs (charts, a copy of data/charts.json). Sources are file:line, file:json.path or a primary documentation URL. Entries with a check are re-derived by the calculation validation. Times are terminal time (trade-server clock).",
  "page": {
    "canonical": "https://brokercheck.co/rsi-divergence-indicator/",
    "title": "RSI Divergence Indicator: Exact Rules, Real Charts and Code",
    "generated_by": "the article build"
  },
  "data": {
    "connection": "market-data-connection",
    "captured_at_utc": "2026-09-24T13:17:36.304698+00:00",
    "symbol": "EURUSD",
    "timeframe": "H1",
    "rows": 5000,
    "first_bar_terminal_time": "2025-12-04 08:00",
    "last_bar_terminal_time": "2026-09-24 15:00",
    "bar_policy": "copy_rates_from_pos start_pos 1: terminal current (forming) bar excluded; closed bars only",
    "timestamp_convention": "Epoch seconds exactly as returned by the terminal, formatted without timezone conversion (terminal time)",
    "digits": 5,
    "point": 1e-05,
    "sha256": "bd8b94236896c4b09410a10d7ff49a80171660dfc04e7d13a07dad7af7ca1cfe",
    "terminal_build": 6182,
    "utc_offset_hours_at_capture": 3
  },
  "sources": {
    "src-rsi": "https://www.metatrader5.com/en/terminal/help/indicators/oscillators/rsi",
    "src-smma": "https://www.metatrader5.com/en/terminal/help/indicators/trend_indicators/ma",
    "src-oncalculate": "https://www.mql5.com/en/docs/event_handlers/oncalculate",
    "src-rates": "https://www.mql5.com/en/docs/python_metatrader5/mt5copyratesfrompos_py",
    "src-tester": "https://www.mql5.com/en/docs/runtime/testing",
    "src-ewm": "https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.ewm.html",
    "src-folders": "https://www.metatrader5.com/en/metaeditor/help/structure",
    "src-autotrading": "https://www.metatrader5.com/en/terminal/help/algotrading/autotrading",
    "src-indicators": "https://www.metatrader5.com/en/terminal/help/charts_analysis/indicators"
  },
  "entries": {
    "data_rows": {
      "value": 5000,
      "display": "5,000",
      "unit": "bars",
      "meaning": "Closed EURUSD H1 bars exported from the MT5 terminal",
      "source": "data/provenance.json:rows",
      "check": {
        "json": "data/provenance.json",
        "path": "rows",
        "format": "int"
      }
    },
    "data_first_bar": {
      "value": "2025-12-04 08:00",
      "display": "2025-12-04 08:00",
      "unit": "terminal time",
      "meaning": "Open time of the oldest exported bar",
      "source": "data/provenance.json:first_bar_terminal_time",
      "check": {
        "json": "data/provenance.json",
        "path": "first_bar_terminal_time",
        "format": "text"
      }
    },
    "data_last_bar": {
      "value": "2026-09-24 15:00",
      "display": "2026-09-24 15:00",
      "unit": "terminal time",
      "meaning": "Open time of the newest exported (closed) bar",
      "source": "data/provenance.json:last_bar_terminal_time",
      "check": {
        "json": "data/provenance.json",
        "path": "last_bar_terminal_time",
        "format": "text"
      }
    },
    "capture_time_utc": {
      "value": "2026-09-24T13:17:36.304698+00:00",
      "display": "24 September 2026",
      "unit": "UTC",
      "meaning": "Capture time of the export",
      "source": "data/provenance.json:captured_at_utc",
      "check": {
        "json": "data/provenance.json",
        "path": "captured_at_utc",
        "format": "capture"
      }
    },
    "utc_offset": {
      "value": 3,
      "display": "UTC+3",
      "unit": "hours",
      "meaning": "Terminal (trade-server) time minus UTC at capture, measured from the newest tick; historical DST not modelled",
      "source": "data/provenance.json:time_offset_measurement.offset_hours_rounded",
      "check": {
        "json": "data/provenance.json",
        "path": "time_offset_measurement.offset_hours_rounded",
        "format": "utc_offset"
      }
    },
    "point": {
      "value": 1e-05,
      "display": "0.00001",
      "unit": "USD per EUR",
      "meaning": "Smallest price step (point) of the symbol in the terminal",
      "source": "data/provenance.json:point",
      "check": {
        "json": "data/provenance.json",
        "path": "point",
        "format": "price"
      }
    },
    "rsi_period": {
      "value": 14,
      "display": "14",
      "unit": "bars",
      "meaning": "Default RSI period (close prices, Wilder smoothing); illustrative default, not an optimized value",
      "source": [
        "downloads/BrokerCheck_RSI_Divergence.mq5:55"
      ],
      "check": {
        "regex": "downloads/BrokerCheck_RSI_Divergence.mq5",
        "pattern": "input\\s+int\\s+RsiPeriod\\s*=\\s*(\\d+)\\s*;",
        "format": "int"
      }
    },
    "pivot_left": {
      "value": 5,
      "display": "5",
      "unit": "bars",
      "meaning": "Bars left of a pivot that it must strictly exceed",
      "source": [
        "downloads/BrokerCheck_RSI_Divergence.mq5:56"
      ],
      "check": {
        "regex": "downloads/BrokerCheck_RSI_Divergence.mq5",
        "pattern": "input\\s+int\\s+PivotLeftBars\\s*=\\s*(\\d+)\\s*;",
        "format": "int"
      }
    },
    "pivot_right": {
      "value": 5,
      "display": "5",
      "unit": "bars",
      "meaning": "Closed bars right of a pivot that must not exceed it; also the confirmation lag",
      "source": [
        "downloads/BrokerCheck_RSI_Divergence.mq5:57"
      ],
      "check": {
        "regex": "downloads/BrokerCheck_RSI_Divergence.mq5",
        "pattern": "input\\s+int\\s+PivotRightBars\\s*=\\s*(\\d+)\\s*;",
        "format": "int"
      }
    },
    "min_distance": {
      "value": 5,
      "display": "5",
      "unit": "bars",
      "meaning": "Minimum bars between the two pivots of a pair",
      "source": [
        "downloads/BrokerCheck_RSI_Divergence.mq5:58"
      ],
      "check": {
        "regex": "downloads/BrokerCheck_RSI_Divergence.mq5",
        "pattern": "input\\s+int\\s+MinPivotDistance\\s*=\\s*(\\d+)\\s*;",
        "format": "int"
      }
    },
    "max_distance": {
      "value": 60,
      "display": "60",
      "unit": "bars",
      "meaning": "Maximum bars between the two pivots of a pair (search limit for the previous pivot)",
      "source": [
        "downloads/BrokerCheck_RSI_Divergence.mq5:59"
      ],
      "check": {
        "regex": "downloads/BrokerCheck_RSI_Divergence.mq5",
        "pattern": "input\\s+int\\s+MaxPivotDistance\\s*=\\s*(\\d+)\\s*;",
        "format": "int"
      }
    },
    "rsi_scale_min": {
      "value": 0,
      "display": "0",
      "unit": "RSI points",
      "meaning": "Fixed lower bound of the indicator window",
      "source": "downloads/BrokerCheck_RSI_Divergence.mq5:16",
      "check": {
        "regex": "downloads/BrokerCheck_RSI_Divergence.mq5",
        "pattern": "#property\\s+indicator_minimum\\s+(\\d+)\\s*$",
        "format": "int"
      }
    },
    "rsi_scale_max": {
      "value": 100,
      "display": "100",
      "unit": "RSI points",
      "meaning": "Fixed upper bound of the indicator window",
      "source": "downloads/BrokerCheck_RSI_Divergence.mq5:17",
      "check": {
        "regex": "downloads/BrokerCheck_RSI_Divergence.mq5",
        "pattern": "#property\\s+indicator_maximum\\s+(\\d+)\\s*$",
        "format": "int"
      }
    },
    "rsi_level_low": {
      "value": 30,
      "display": "30",
      "unit": "RSI points",
      "meaning": "Reference line drawn in the indicator window; not used as a filter",
      "source": "downloads/BrokerCheck_RSI_Divergence.mq5:18",
      "check": {
        "regex": "downloads/BrokerCheck_RSI_Divergence.mq5",
        "pattern": "#property\\s+indicator_level1\\s+(\\d+)\\s*$",
        "format": "int"
      }
    },
    "rsi_level_high": {
      "value": 70,
      "display": "70",
      "unit": "RSI points",
      "meaning": "Reference line drawn in the indicator window; not used as a filter",
      "source": "downloads/BrokerCheck_RSI_Divergence.mq5:19",
      "check": {
        "regex": "downloads/BrokerCheck_RSI_Divergence.mq5",
        "pattern": "#property\\s+indicator_level2\\s+(\\d+)\\s*$",
        "format": "int"
      }
    },
    "display_digits": {
      "value": 2,
      "display": "2",
      "unit": "decimals",
      "meaning": "Decimals the indicator displays for RSI",
      "source": "downloads/BrokerCheck_RSI_Divergence.mq5:109",
      "check": {
        "regex": "downloads/BrokerCheck_RSI_Divergence.mq5",
        "pattern": "INDICATOR_DIGITS,(\\d+)\\)",
        "format": "int"
      }
    },
    "closes_needed": {
      "value": 15,
      "display": "15",
      "unit": "closes",
      "meaning": "Closes needed for the first RSI value (period changes need period + 1 closes)",
      "source": [
        "downloads/BrokerCheck_RSI_Divergence.mq5:279"
      ],
      "check": {
        "regex": "downloads/BrokerCheck_RSI_Divergence.mq5",
        "pattern": "input\\s+int\\s+RsiPeriod\\s*=\\s*(\\d+)\\s*;",
        "format": "int",
        "add": 1
      }
    },
    "rsi_all_gains": {
      "value": 100.0,
      "display": "100",
      "unit": "RSI points",
      "meaning": "RSI returned when the average loss is zero and the average gain is positive",
      "source": "downloads/BrokerCheck_RSI_Divergence.mq5:143"
    },
    "rsi_no_change": {
      "value": 50.0,
      "display": "50",
      "unit": "RSI points",
      "meaning": "RSI returned when average gain and average loss are both zero (no price change)",
      "source": "downloads/BrokerCheck_RSI_Divergence.mq5:143"
    },
    "rsi_all_losses": {
      "value": 0.0,
      "display": "0",
      "unit": "RSI points",
      "meaning": "RSI given by the formula when the average gain is zero and the average loss is positive",
      "source": "downloads/BrokerCheck_RSI_Divergence.mq5:144"
    },
    "min_pivot_spacing": {
      "value": 6,
      "display": "6",
      "unit": "bars",
      "meaning": "Minimum distance between two pivots of the same kind implied by the rule (min(L, R) + 1); also the smallest spacing found in the export",
      "source": [
        "downloads/BrokerCheck_RSI_Divergence.mq5:176-198",
        "data/derived.csv:pivot_high",
        "data/derived.csv:pivot_low"
      ],
      "check": {
        "csv": "data/derived.csv",
        "min_gap": [
          "pivot_high",
          "pivot_low"
        ],
        "format": "int"
      },
      "symbol": "EURUSD",
      "timeframe": "H1",
      "window": "2025-12-04 08:00 to 2026-09-24 15:00",
      "calculation": "the reference calculation"
    },
    "doc_range_min": {
      "value": 0,
      "display": "0",
      "unit": "RSI points",
      "meaning": "Lower end of the RSI range given by the MT5 help",
      "source": "https://www.metatrader5.com/en/terminal/help/indicators/oscillators/rsi",
      "doc_section": "src-rsi"
    },
    "doc_range_max": {
      "value": 100,
      "display": "100",
      "unit": "RSI points",
      "meaning": "Upper end of the RSI range given by the MT5 help",
      "source": "https://www.metatrader5.com/en/terminal/help/indicators/oscillators/rsi",
      "doc_section": "src-rsi"
    },
    "doc_wilder_period": {
      "value": 14,
      "display": "14",
      "unit": "periods",
      "meaning": "Period Wilder recommended, per the MT5 help",
      "source": "https://www.metatrader5.com/en/terminal/help/indicators/oscillators/rsi",
      "doc_section": "src-rsi"
    },
    "doc_alt_period_short": {
      "value": 9,
      "display": "9",
      "unit": "periods",
      "meaning": "Alternative period the MT5 help says gained popularity",
      "source": "https://www.metatrader5.com/en/terminal/help/indicators/oscillators/rsi",
      "doc_section": "src-rsi"
    },
    "doc_alt_period_long": {
      "value": 25,
      "display": "25",
      "unit": "periods",
      "meaning": "Alternative period the MT5 help says gained popularity",
      "source": "https://www.metatrader5.com/en/terminal/help/indicators/oscillators/rsi",
      "doc_section": "src-rsi"
    },
    "doc_top_level": {
      "value": 70,
      "display": "70",
      "unit": "RSI points",
      "meaning": "Level above which the MT5 help says RSI usually tops",
      "source": "https://www.metatrader5.com/en/terminal/help/indicators/oscillators/rsi",
      "doc_section": "src-rsi"
    },
    "doc_bottom_level": {
      "value": 30,
      "display": "30",
      "unit": "RSI points",
      "meaning": "Level below which the MT5 help says RSI usually bottoms",
      "source": "https://www.metatrader5.com/en/terminal/help/indicators/oscillators/rsi",
      "doc_section": "src-rsi"
    },
    "weight_default": {
      "value": 0.07142857142857142,
      "display": "1/14",
      "unit": "weight",
      "meaning": "Weight of the newest gain or loss in a Wilder average with period 14",
      "source": [
        "downloads/BrokerCheck_RSI_Divergence.mq5:317-323",
        "https://www.metatrader5.com/en/terminal/help/indicators/trend_indicators/ma"
      ],
      "check": {
        "compute": "fraction",
        "period": 14
      }
    },
    "weight_short": {
      "value": 0.1111111111111111,
      "display": "1/9",
      "unit": "weight",
      "meaning": "Weight of the newest gain or loss in a Wilder average with period 9",
      "source": [
        "downloads/BrokerCheck_RSI_Divergence.mq5:317-323",
        "https://www.metatrader5.com/en/terminal/help/indicators/trend_indicators/ma"
      ],
      "check": {
        "compute": "fraction",
        "period": 9
      }
    },
    "weight_long": {
      "value": 0.04,
      "display": "1/25",
      "unit": "weight",
      "meaning": "Weight of the newest gain or loss in a Wilder average with period 25",
      "source": [
        "downloads/BrokerCheck_RSI_Divergence.mq5:317-323",
        "https://www.metatrader5.com/en/terminal/help/indicators/trend_indicators/ma"
      ],
      "check": {
        "compute": "fraction",
        "period": 25
      }
    },
    "seed_decay_bars": {
      "value": 100,
      "display": "100",
      "unit": "bars",
      "meaning": "Illustrative number of bars after the seed used for the seed-weight example (an editorial choice, not a measurement)",
      "source": "the article build"
    },
    "seed_weight_after_decay": {
      "value": 0.0006046884354123091,
      "display": "0.06%",
      "unit": "share of each average",
      "meaning": "Weight ((P - 1) / P) ** bars that the seed still carries in each Wilder average after the given number of bars",
      "source": [
        "downloads/BrokerCheck_RSI_Divergence.mq5:317-323",
        "the article build"
      ],
      "check": {
        "compute": "decay_percent",
        "period": 14,
        "bars": 100
      }
    },
    "seed_rsi": {
      "value": 42.78350515463967,
      "display": "42.78",
      "unit": "RSI points",
      "meaning": "First RSI value (bar index 14, seeded with the mean of the first 14 changes); native harness and pandas agree",
      "source": [
        "data/crosscheck.json:rsi.seed_rsi_index_14",
        "data/derived.csv:16",
        "data/native-run.json:checks"
      ],
      "check": {
        "json": "data/crosscheck.json",
        "path": "rsi.seed_rsi_index_14",
        "format": "rsi"
      },
      "symbol": "EURUSD",
      "timeframe": "H1",
      "window": "2025-12-04 08:00 to 2026-09-24 15:00",
      "calculation": [
        "the reference calculation",
        "the cross-check"
      ]
    },
    "seed_bar_time": {
      "value": "2025-12-04 22:00",
      "display": "2025-12-04 22:00",
      "unit": "terminal time",
      "meaning": "Open time of the bar that carries the first RSI value",
      "source": "data/derived.csv:16",
      "check": {
        "csv": "data/derived.csv",
        "row": 14,
        "column": "terminal_time",
        "format": "text"
      },
      "symbol": "EURUSD",
      "timeframe": "H1",
      "bar_time": "2025-12-04 22:00",
      "calculation": "the reference calculation"
    },
    "rsi_values_compared": {
      "value": 4986,
      "display": "4,986",
      "unit": "values",
      "meaning": "RSI values defined in both implementations and compared",
      "source": "data/crosscheck.json:rsi.compared_values",
      "check": {
        "json": "data/crosscheck.json",
        "path": "rsi.compared_values",
        "format": "int"
      },
      "symbol": "EURUSD",
      "timeframe": "H1",
      "window": "2025-12-04 08:00 to 2026-09-24 15:00",
      "calculation": "the cross-check"
    },
    "rsi_special_values": {
      "value": 0,
      "display": "none",
      "unit": "values",
      "meaning": "RSI values in the real export that are exactly 0, 50 or 100",
      "source": "data/crosscheck.json:real_data_rule_coverage.rsi_exactly_0_50_or_100",
      "check": {
        "json": "data/crosscheck.json",
        "path": "real_data_rule_coverage.rsi_exactly_0_50_or_100",
        "format": "none_if_zero"
      },
      "symbol": "EURUSD",
      "timeframe": "H1",
      "window": "2025-12-04 08:00 to 2026-09-24 15:00",
      "calculation": "the cross-check"
    },
    "pivot_highs": {
      "value": 313,
      "display": "313",
      "unit": "pivots",
      "meaning": "Confirmed pivot highs in the export (identical in MQL and pandas)",
      "source": [
        "data/derived.csv:pivot_high",
        "data/crosscheck.json:checks"
      ],
      "check": {
        "csv": "data/derived.csv",
        "sum": "pivot_high",
        "format": "int"
      },
      "symbol": "EURUSD",
      "timeframe": "H1",
      "window": "2025-12-04 08:00 to 2026-09-24 15:00",
      "calculation": "the reference calculation"
    },
    "pivot_lows": {
      "value": 311,
      "display": "311",
      "unit": "pivots",
      "meaning": "Confirmed pivot lows in the export (identical in MQL and pandas)",
      "source": [
        "data/derived.csv:pivot_low",
        "data/crosscheck.json:checks"
      ],
      "check": {
        "csv": "data/derived.csv",
        "sum": "pivot_low",
        "format": "int"
      },
      "symbol": "EURUSD",
      "timeframe": "H1",
      "window": "2025-12-04 08:00 to 2026-09-24 15:00",
      "calculation": "the reference calculation"
    },
    "tie_high_right": {
      "value": 10,
      "display": "10",
      "unit": "bars",
      "meaning": "Pivot highs with an equal high among the right-side bars",
      "source": "data/crosscheck.json:real_data_rule_coverage.pivot_high_with_equal_high_on_right",
      "check": {
        "json": "data/crosscheck.json",
        "path": "real_data_rule_coverage.pivot_high_with_equal_high_on_right",
        "format": "int"
      },
      "symbol": "EURUSD",
      "timeframe": "H1",
      "window": "2025-12-04 08:00 to 2026-09-24 15:00",
      "calculation": "the cross-check"
    },
    "tie_low_right": {
      "value": 4,
      "display": "4",
      "unit": "bars",
      "meaning": "Pivot lows with an equal low among the right-side bars",
      "source": "data/crosscheck.json:real_data_rule_coverage.pivot_low_with_equal_low_on_right",
      "check": {
        "json": "data/crosscheck.json",
        "path": "real_data_rule_coverage.pivot_low_with_equal_low_on_right",
        "format": "int"
      },
      "symbol": "EURUSD",
      "timeframe": "H1",
      "window": "2025-12-04 08:00 to 2026-09-24 15:00",
      "calculation": "the cross-check"
    },
    "tie_high_left": {
      "value": 14,
      "display": "14",
      "unit": "bars",
      "meaning": "Bars that would be pivot highs except for an equal high among the left-side bars",
      "source": "data/crosscheck.json:real_data_rule_coverage.rejected_high_equal_to_left_high",
      "check": {
        "json": "data/crosscheck.json",
        "path": "real_data_rule_coverage.rejected_high_equal_to_left_high",
        "format": "int"
      },
      "symbol": "EURUSD",
      "timeframe": "H1",
      "window": "2025-12-04 08:00 to 2026-09-24 15:00",
      "calculation": "the cross-check"
    },
    "tie_low_left": {
      "value": 4,
      "display": "4",
      "unit": "bars",
      "meaning": "Bars that would be pivot lows except for an equal low among the left-side bars",
      "source": "data/crosscheck.json:real_data_rule_coverage.rejected_low_equal_to_left_low",
      "check": {
        "json": "data/crosscheck.json",
        "path": "real_data_rule_coverage.rejected_low_equal_to_left_low",
        "format": "int"
      },
      "symbol": "EURUSD",
      "timeframe": "H1",
      "window": "2025-12-04 08:00 to 2026-09-24 15:00",
      "calculation": "the cross-check"
    },
    "evaluated_pairs": {
      "value": 621,
      "display": "621",
      "unit": "pairs",
      "meaning": "Consecutive same-kind pivot pairs that passed the distance and warm-up tests",
      "source": "data/crosscheck.json:decision_margins.evaluated_pairs",
      "check": {
        "json": "data/crosscheck.json",
        "path": "decision_margins.evaluated_pairs",
        "format": "int"
      },
      "symbol": "EURUSD",
      "timeframe": "H1",
      "window": "2025-12-04 08:00 to 2026-09-24 15:00",
      "calculation": "the cross-check"
    },
    "min_rsi_gap": {
      "value": 0.05349819681001122,
      "display": "0.05",
      "unit": "RSI points",
      "meaning": "Smallest RSI difference between the two pivots of any evaluated pair",
      "source": "data/crosscheck.json:decision_margins.rsi_min_abs_difference",
      "check": {
        "json": "data/crosscheck.json",
        "path": "decision_margins.rsi_min_abs_difference",
        "format": "rsi"
      },
      "symbol": "EURUSD",
      "timeframe": "H1",
      "window": "2025-12-04 08:00 to 2026-09-24 15:00",
      "calculation": "the cross-check"
    },
    "min_price_gap": {
      "value": 1.0000000000065512e-05,
      "display": "0.00001",
      "unit": "USD per EUR",
      "meaning": "Smallest non-zero price difference between the two pivots of any evaluated pair (one point)",
      "source": "data/crosscheck.json:decision_margins.price_min_nonzero_difference",
      "check": {
        "json": "data/crosscheck.json",
        "path": "decision_margins.price_min_nonzero_difference",
        "format": "price"
      },
      "symbol": "EURUSD",
      "timeframe": "H1",
      "window": "2025-12-04 08:00 to 2026-09-24 15:00",
      "calculation": "the cross-check"
    },
    "equal_price_pairs": {
      "value": 1,
      "display": "1",
      "unit": "pairs",
      "meaning": "Evaluated pairs with exactly equal pivot prices (never a divergence)",
      "source": "data/crosscheck.json:decision_margins.equal_price_pairs",
      "check": {
        "json": "data/crosscheck.json",
        "path": "decision_margins.equal_price_pairs",
        "format": "int"
      },
      "symbol": "EURUSD",
      "timeframe": "H1",
      "window": "2025-12-04 08:00 to 2026-09-24 15:00",
      "calculation": "the cross-check"
    },
    "det_regular_bearish": {
      "value": 29,
      "display": "29",
      "unit": "detections",
      "meaning": "Regular bearish detections in the full export (ShowHidden on for hidden types)",
      "source": [
        "data/divergences.csv:type",
        "data/crosscheck.json:detections.by_type.regular_bearish"
      ],
      "check": {
        "csv": "data/divergences.csv",
        "count": {
          "type": "regular_bearish"
        },
        "format": "int"
      },
      "symbol": "EURUSD",
      "timeframe": "H1",
      "window": "2025-12-04 08:00 to 2026-09-24 15:00",
      "calculation": "the reference calculation"
    },
    "det_regular_bullish": {
      "value": 44,
      "display": "44",
      "unit": "detections",
      "meaning": "Regular bullish detections in the full export (ShowHidden on for hidden types)",
      "source": [
        "data/divergences.csv:type",
        "data/crosscheck.json:detections.by_type.regular_bullish"
      ],
      "check": {
        "csv": "data/divergences.csv",
        "count": {
          "type": "regular_bullish"
        },
        "format": "int"
      },
      "symbol": "EURUSD",
      "timeframe": "H1",
      "window": "2025-12-04 08:00 to 2026-09-24 15:00",
      "calculation": "the reference calculation"
    },
    "det_hidden_bearish": {
      "value": 43,
      "display": "43",
      "unit": "detections",
      "meaning": "Hidden bearish detections in the full export (ShowHidden on for hidden types)",
      "source": [
        "data/divergences.csv:type",
        "data/crosscheck.json:detections.by_type.hidden_bearish"
      ],
      "check": {
        "csv": "data/divergences.csv",
        "count": {
          "type": "hidden_bearish"
        },
        "format": "int"
      },
      "symbol": "EURUSD",
      "timeframe": "H1",
      "window": "2025-12-04 08:00 to 2026-09-24 15:00",
      "calculation": "the reference calculation"
    },
    "det_hidden_bullish": {
      "value": 29,
      "display": "29",
      "unit": "detections",
      "meaning": "Hidden bullish detections in the full export (ShowHidden on for hidden types)",
      "source": [
        "data/divergences.csv:type",
        "data/crosscheck.json:detections.by_type.hidden_bullish"
      ],
      "check": {
        "csv": "data/divergences.csv",
        "count": {
          "type": "hidden_bullish"
        },
        "format": "int"
      },
      "symbol": "EURUSD",
      "timeframe": "H1",
      "window": "2025-12-04 08:00 to 2026-09-24 15:00",
      "calculation": "the reference calculation"
    },
    "det_regular_total": {
      "value": 73,
      "display": "73",
      "unit": "detections",
      "meaning": "Regular detections in the full export at default settings (ShowHidden false); regular detections do not depend on ShowHidden (native check show_hidden_false_regular_unchanged)",
      "source": [
        "data/divergences.csv:type",
        "data/native-run.json:checks"
      ],
      "check": {
        "csv": "data/divergences.csv",
        "count_prefix": {
          "type": "regular_"
        },
        "format": "int"
      },
      "symbol": "EURUSD",
      "timeframe": "H1",
      "window": "2025-12-04 08:00 to 2026-09-24 15:00",
      "calculation": "the reference calculation"
    },
    "det_total_all": {
      "value": 145,
      "display": "145",
      "unit": "detections",
      "meaning": "All detections with ShowHidden on; matched exactly between MQL and pandas",
      "source": "data/crosscheck.json:detections.total",
      "check": {
        "json": "data/crosscheck.json",
        "path": "detections.total",
        "format": "int"
      },
      "symbol": "EURUSD",
      "timeframe": "H1",
      "window": "2025-12-04 08:00 to 2026-09-24 15:00",
      "calculation": [
        "the reference calculation",
        "the cross-check"
      ]
    },
    "context_before": {
      "value": 12,
      "display": "12",
      "unit": "bars",
      "meaning": "Bars required before pivot 1 for figures 2 to 4",
      "source": [
        "data/charts.json:selection_constants.context_bars_before_pivot1",
        "the chart generation"
      ],
      "check": {
        "json": "data/charts.json",
        "path": "selection_constants.context_bars_before_pivot1",
        "format": "int"
      }
    },
    "context_after": {
      "value": 24,
      "display": "24",
      "unit": "bars",
      "meaning": "Bars required (and inspected) after the confirming bar for figures 2 to 4",
      "source": [
        "data/charts.json:selection_constants.context_bars_after_confirm",
        "the chart generation"
      ],
      "check": {
        "json": "data/charts.json",
        "path": "selection_constants.context_bars_after_confirm",
        "format": "int"
      }
    },
    "lag_max_distance": {
      "value": 30,
      "display": "30",
      "unit": "bars",
      "meaning": "Maximum pivot distance for the figure 5 selection",
      "source": [
        "data/charts.json:selection_constants.lag_max_pivot_distance",
        "the chart generation"
      ],
      "check": {
        "json": "data/charts.json",
        "path": "selection_constants.lag_max_pivot_distance",
        "format": "int"
      }
    },
    "fig1_bars": {
      "value": 240,
      "display": "240",
      "unit": "bars",
      "meaning": "Bars shown in figure 1 (newest bars of the export)",
      "source": "data/charts.json:charts.overview.window.bars",
      "check": {
        "json": "data/charts.json",
        "path": "charts.overview.window.bars",
        "format": "int"
      },
      "symbol": "EURUSD",
      "timeframe": "H1",
      "window": "2025-12-04 08:00 to 2026-09-24 15:00",
      "calculation": "the chart generation"
    },
    "fig1_first_bar": {
      "value": "2026-09-10 16:00",
      "display": "2026-09-10 16:00",
      "unit": "terminal time",
      "meaning": "First bar of figure 1",
      "source": "data/derived.csv:4762",
      "check": {
        "csv": "data/derived.csv",
        "row": 4760,
        "column": "terminal_time",
        "format": "text"
      },
      "symbol": "EURUSD",
      "timeframe": "H1",
      "bar_time": "2026-09-10 16:00",
      "calculation": "the reference calculation",
      "figure": "images/img01_overview.png"
    },
    "fig1_last_bar": {
      "value": "2026-09-24 15:00",
      "display": "2026-09-24 15:00",
      "unit": "terminal time",
      "meaning": "Last bar of figure 1",
      "source": "data/derived.csv:5001",
      "check": {
        "csv": "data/derived.csv",
        "row": 4999,
        "column": "terminal_time",
        "format": "text"
      },
      "symbol": "EURUSD",
      "timeframe": "H1",
      "bar_time": "2026-09-24 15:00",
      "calculation": "the reference calculation",
      "figure": "images/img01_overview.png"
    },
    "fig1_bullish": {
      "value": 4,
      "display": "4",
      "unit": "detections",
      "meaning": "Regular bullish detections inside figure 1 at default settings",
      "source": "data/charts.json:charts.overview.counts.regular_bullish",
      "check": {
        "json": "data/charts.json",
        "path": "charts.overview.counts.regular_bullish",
        "format": "int"
      },
      "figure": "images/img01_overview.png",
      "symbol": "EURUSD",
      "timeframe": "H1",
      "window": "2026-09-10 16:00 to 2026-09-24 15:00",
      "calculation": "the chart generation"
    },
    "fig1_bearish": {
      "value": 0,
      "display": "0",
      "unit": "detections",
      "meaning": "Regular bearish detections inside figure 1 at default settings",
      "source": "data/charts.json:charts.overview.counts.regular_bearish",
      "check": {
        "json": "data/charts.json",
        "path": "charts.overview.counts.regular_bearish",
        "format": "int"
      },
      "figure": "images/img01_overview.png",
      "symbol": "EURUSD",
      "timeframe": "H1",
      "window": "2026-09-10 16:00 to 2026-09-24 15:00",
      "calculation": "the chart generation"
    },
    "fig2_p1_time": {
      "value": "2026-08-28 04:00",
      "display": "2026-08-28 04:00",
      "unit": "terminal time",
      "meaning": "Pivot 1 bar",
      "source": "data/derived.csv:4534",
      "check": {
        "csv": "data/derived.csv",
        "row": 4532,
        "column": "terminal_time",
        "format": "text"
      },
      "symbol": "EURUSD",
      "timeframe": "H1",
      "bar_time": "2026-08-28 04:00",
      "calculation": "the reference calculation",
      "figure": "images/img02_bearish.png"
    },
    "fig2_p1_price": {
      "value": 1.16549,
      "display": "1.16549",
      "unit": "USD per EUR",
      "meaning": "Pivot 1 high",
      "source": "data/derived.csv:4534",
      "check": {
        "csv": "data/derived.csv",
        "row": 4532,
        "column": "high",
        "format": "price"
      },
      "symbol": "EURUSD",
      "timeframe": "H1",
      "bar_time": "2026-08-28 04:00",
      "calculation": "the MT5 data export",
      "figure": "images/img02_bearish.png"
    },
    "fig2_p1_rsi": {
      "value": 47.821827353601456,
      "display": "47.82",
      "unit": "RSI points",
      "meaning": "RSI at pivot 1",
      "source": "data/derived.csv:4534",
      "check": {
        "csv": "data/derived.csv",
        "row": 4532,
        "column": "rsi",
        "format": "rsi"
      },
      "symbol": "EURUSD",
      "timeframe": "H1",
      "bar_time": "2026-08-28 04:00",
      "calculation": "the reference calculation",
      "figure": "images/img02_bearish.png"
    },
    "fig2_p2_time": {
      "value": "2026-08-28 17:00",
      "display": "2026-08-28 17:00",
      "unit": "terminal time",
      "meaning": "Pivot 2 bar",
      "source": "data/derived.csv:4547",
      "check": {
        "csv": "data/derived.csv",
        "row": 4545,
        "column": "terminal_time",
        "format": "text"
      },
      "symbol": "EURUSD",
      "timeframe": "H1",
      "bar_time": "2026-08-28 17:00",
      "calculation": "the reference calculation",
      "figure": "images/img02_bearish.png"
    },
    "fig2_p2_price": {
      "value": 1.16588,
      "display": "1.16588",
      "unit": "USD per EUR",
      "meaning": "Pivot 2 high",
      "source": "data/derived.csv:4547",
      "check": {
        "csv": "data/derived.csv",
        "row": 4545,
        "column": "high",
        "format": "price"
      },
      "symbol": "EURUSD",
      "timeframe": "H1",
      "bar_time": "2026-08-28 17:00",
      "calculation": "the MT5 data export",
      "figure": "images/img02_bearish.png"
    },
    "fig2_p2_rsi": {
      "value": 28.82788776456293,
      "display": "28.83",
      "unit": "RSI points",
      "meaning": "RSI at pivot 2",
      "source": "data/derived.csv:4547",
      "check": {
        "csv": "data/derived.csv",
        "row": 4545,
        "column": "rsi",
        "format": "rsi"
      },
      "symbol": "EURUSD",
      "timeframe": "H1",
      "bar_time": "2026-08-28 17:00",
      "calculation": "the reference calculation",
      "figure": "images/img02_bearish.png"
    },
    "fig2_confirm_clock": {
      "value": "22:00",
      "display": "22:00",
      "unit": "terminal time (clock)",
      "meaning": "Open time of the confirming bar",
      "source": "data/derived.csv:4552",
      "check": {
        "csv": "data/derived.csv",
        "row": 4550,
        "column": "terminal_time",
        "format": "clock"
      },
      "symbol": "EURUSD",
      "timeframe": "H1",
      "bar_time": "2026-08-28 22:00",
      "calculation": "the reference calculation",
      "figure": "images/img02_bearish.png"
    },
    "fig2_rsi_gap": {
      "value": 18.993939589038526,
      "display": "18.99",
      "unit": "RSI points",
      "meaning": "Absolute RSI difference between the pivots",
      "source": [
        "data/derived.csv:4534",
        "data/derived.csv:4547"
      ],
      "check": {
        "csv": "data/derived.csv",
        "minus": [
          [
            "rsi",
            4532
          ],
          [
            "rsi",
            4545
          ]
        ],
        "sign": 0,
        "format": "rsi"
      },
      "figure": "images/img02_bearish.png",
      "symbol": "EURUSD",
      "timeframe": "H1",
      "window": "2026-08-27 16:00 to 2026-08-31 22:00",
      "calculation": [
        "the reference calculation",
        "the article build"
      ]
    },
    "fig2_confirm_close": {
      "value": 1.15853,
      "display": "1.15853",
      "unit": "USD per EUR",
      "meaning": "Close of the confirming bar",
      "source": "data/derived.csv:4552",
      "check": {
        "csv": "data/derived.csv",
        "row": 4550,
        "column": "close",
        "format": "price"
      },
      "symbol": "EURUSD",
      "timeframe": "H1",
      "bar_time": "2026-08-28 22:00",
      "calculation": "the MT5 data export",
      "figure": "images/img02_bearish.png"
    },
    "fig2_high_diff": {
      "value": 0.0003900000000001125,
      "display": "0.00039",
      "unit": "USD per EUR",
      "meaning": "Pivot 2 high minus pivot 1 high",
      "source": [
        "data/derived.csv:4547",
        "data/derived.csv:4534"
      ],
      "check": {
        "csv": "data/derived.csv",
        "minus": [
          [
            "high",
            4545
          ],
          [
            "high",
            4532
          ]
        ],
        "sign": 1,
        "format": "price"
      },
      "symbol": "EURUSD",
      "timeframe": "H1",
      "bar_time": [
        "2026-08-28 17:00",
        "2026-08-28 04:00"
      ],
      "calculation": [
        "the MT5 data export",
        "the article build"
      ],
      "figure": "images/img02_bearish.png"
    },
    "fig2_p2_close": {
      "value": 1.16168,
      "display": "1.16168",
      "unit": "USD per EUR",
      "meaning": "Close of the pivot 2 bar",
      "source": "data/derived.csv:4547",
      "check": {
        "csv": "data/derived.csv",
        "row": 4545,
        "column": "close",
        "format": "price"
      },
      "symbol": "EURUSD",
      "timeframe": "H1",
      "bar_time": "2026-08-28 17:00",
      "calculation": "the MT5 data export",
      "figure": "images/img02_bearish.png"
    },
    "fig2_p2_close_gap": {
      "value": 0.0041999999999999815,
      "display": "0.00420",
      "unit": "USD per EUR",
      "meaning": "Pivot 2 high minus the close of the same bar",
      "source": [
        "data/derived.csv:4547",
        "data/derived.csv:4547"
      ],
      "check": {
        "csv": "data/derived.csv",
        "minus": [
          [
            "high",
            4545
          ],
          [
            "close",
            4545
          ]
        ],
        "sign": 1,
        "format": "price"
      },
      "symbol": "EURUSD",
      "timeframe": "H1",
      "bar_time": [
        "2026-08-28 17:00",
        "2026-08-28 17:00"
      ],
      "calculation": [
        "the MT5 data export",
        "the article build"
      ],
      "figure": "images/img02_bearish.png"
    },
    "fig2_p2_change": {
      "value": -0.0021199999999998997,
      "display": "0.00212",
      "unit": "USD per EUR",
      "meaning": "Close-to-close change on the pivot 2 bar (negative: a loss for RSI); displayed as a magnitude",
      "source": [
        "data/derived.csv:4547",
        "data/derived.csv:4546"
      ],
      "check": {
        "csv": "data/derived.csv",
        "minus": [
          [
            "close",
            4545
          ],
          [
            "close",
            4544
          ]
        ],
        "sign": -1,
        "format": "price"
      },
      "symbol": "EURUSD",
      "timeframe": "H1",
      "bar_time": [
        "2026-08-28 17:00",
        "2026-08-28 16:00"
      ],
      "calculation": [
        "the MT5 data export",
        "the article build"
      ],
      "figure": "images/img02_bearish.png"
    },
    "fig3_p1_time": {
      "value": "2026-05-20 11:00",
      "display": "2026-05-20 11:00",
      "unit": "terminal time",
      "meaning": "Pivot 1 bar",
      "source": "data/derived.csv:2813",
      "check": {
        "csv": "data/derived.csv",
        "row": 2811,
        "column": "terminal_time",
        "format": "text"
      },
      "symbol": "EURUSD",
      "timeframe": "H1",
      "bar_time": "2026-05-20 11:00",
      "calculation": "the reference calculation",
      "figure": "images/img03_bullish.png"
    },
    "fig3_p1_price": {
      "value": 1.1583,
      "display": "1.15830",
      "unit": "USD per EUR",
      "meaning": "Pivot 1 low",
      "source": "data/derived.csv:2813",
      "check": {
        "csv": "data/derived.csv",
        "row": 2811,
        "column": "low",
        "format": "price"
      },
      "symbol": "EURUSD",
      "timeframe": "H1",
      "bar_time": "2026-05-20 11:00",
      "calculation": "the MT5 data export",
      "figure": "images/img03_bullish.png"
    },
    "fig3_p1_rsi": {
      "value": 32.46006083772198,
      "display": "32.46",
      "unit": "RSI points",
      "meaning": "RSI at pivot 1",
      "source": "data/derived.csv:2813",
      "check": {
        "csv": "data/derived.csv",
        "row": 2811,
        "column": "rsi",
        "format": "rsi"
      },
      "symbol": "EURUSD",
      "timeframe": "H1",
      "bar_time": "2026-05-20 11:00",
      "calculation": "the reference calculation",
      "figure": "images/img03_bullish.png"
    },
    "fig3_p2_time": {
      "value": "2026-05-20 17:00",
      "display": "2026-05-20 17:00",
      "unit": "terminal time",
      "meaning": "Pivot 2 bar",
      "source": "data/derived.csv:2819",
      "check": {
        "csv": "data/derived.csv",
        "row": 2817,
        "column": "terminal_time",
        "format": "text"
      },
      "symbol": "EURUSD",
      "timeframe": "H1",
      "bar_time": "2026-05-20 17:00",
      "calculation": "the reference calculation",
      "figure": "images/img03_bullish.png"
    },
    "fig3_p2_price": {
      "value": 1.15821,
      "display": "1.15821",
      "unit": "USD per EUR",
      "meaning": "Pivot 2 low",
      "source": "data/derived.csv:2819",
      "check": {
        "csv": "data/derived.csv",
        "row": 2817,
        "column": "low",
        "format": "price"
      },
      "symbol": "EURUSD",
      "timeframe": "H1",
      "bar_time": "2026-05-20 17:00",
      "calculation": "the MT5 data export",
      "figure": "images/img03_bullish.png"
    },
    "fig3_p2_rsi": {
      "value": 58.677711512723306,
      "display": "58.68",
      "unit": "RSI points",
      "meaning": "RSI at pivot 2",
      "source": "data/derived.csv:2819",
      "check": {
        "csv": "data/derived.csv",
        "row": 2817,
        "column": "rsi",
        "format": "rsi"
      },
      "symbol": "EURUSD",
      "timeframe": "H1",
      "bar_time": "2026-05-20 17:00",
      "calculation": "the reference calculation",
      "figure": "images/img03_bullish.png"
    },
    "fig3_confirm_clock": {
      "value": "22:00",
      "display": "22:00",
      "unit": "terminal time (clock)",
      "meaning": "Open time of the confirming bar",
      "source": "data/derived.csv:2824",
      "check": {
        "csv": "data/derived.csv",
        "row": 2822,
        "column": "terminal_time",
        "format": "clock"
      },
      "symbol": "EURUSD",
      "timeframe": "H1",
      "bar_time": "2026-05-20 22:00",
      "calculation": "the reference calculation",
      "figure": "images/img03_bullish.png"
    },
    "fig3_rsi_gap": {
      "value": 26.217650675001323,
      "display": "26.22",
      "unit": "RSI points",
      "meaning": "Absolute RSI difference between the pivots",
      "source": [
        "data/derived.csv:2813",
        "data/derived.csv:2819"
      ],
      "check": {
        "csv": "data/derived.csv",
        "minus": [
          [
            "rsi",
            2811
          ],
          [
            "rsi",
            2817
          ]
        ],
        "sign": 0,
        "format": "rsi"
      },
      "figure": "images/img03_bullish.png",
      "symbol": "EURUSD",
      "timeframe": "H1",
      "window": "2026-05-19 23:00 to 2026-05-21 22:00",
      "calculation": [
        "the reference calculation",
        "the article build"
      ]
    },
    "fig3_confirm_close": {
      "value": 1.16273,
      "display": "1.16273",
      "unit": "USD per EUR",
      "meaning": "Close of the confirming bar",
      "source": "data/derived.csv:2824",
      "check": {
        "csv": "data/derived.csv",
        "row": 2822,
        "column": "close",
        "format": "price"
      },
      "symbol": "EURUSD",
      "timeframe": "H1",
      "bar_time": "2026-05-20 22:00",
      "calculation": "the MT5 data export",
      "figure": "images/img03_bullish.png"
    },
    "fig3_low_diff": {
      "value": 9.000000000014552e-05,
      "display": "0.00009",
      "unit": "USD per EUR",
      "meaning": "Pivot 1 low minus pivot 2 low",
      "source": [
        "data/derived.csv:2813",
        "data/derived.csv:2819"
      ],
      "check": {
        "csv": "data/derived.csv",
        "minus": [
          [
            "low",
            2811
          ],
          [
            "low",
            2817
          ]
        ],
        "sign": 1,
        "format": "price"
      },
      "symbol": "EURUSD",
      "timeframe": "H1",
      "bar_time": [
        "2026-05-20 11:00",
        "2026-05-20 17:00"
      ],
      "calculation": [
        "the MT5 data export",
        "the article build"
      ],
      "figure": "images/img03_bullish.png"
    },
    "fig3_low_diff_points": {
      "value": 9,
      "display": "9",
      "unit": "points",
      "meaning": "Pivot 1 low minus pivot 2 low in points of 0.00001",
      "source": [
        "data/derived.csv:2813",
        "data/derived.csv:2819",
        "data/provenance.json:point"
      ],
      "check": {
        "csv": "data/derived.csv",
        "minus": [
          [
            "low",
            2811
          ],
          [
            "low",
            2817
          ]
        ],
        "sign": 1,
        "format": "points",
        "point": 1e-05
      },
      "figure": "images/img03_bullish.png",
      "symbol": "EURUSD",
      "timeframe": "H1",
      "window": "2026-05-19 23:00 to 2026-05-21 22:00",
      "calculation": [
        "the MT5 data export",
        "the article build"
      ]
    },
    "fig3_p2_close": {
      "value": 1.16176,
      "display": "1.16176",
      "unit": "USD per EUR",
      "meaning": "Close of the pivot 2 bar",
      "source": "data/derived.csv:2819",
      "check": {
        "csv": "data/derived.csv",
        "row": 2817,
        "column": "close",
        "format": "price"
      },
      "symbol": "EURUSD",
      "timeframe": "H1",
      "bar_time": "2026-05-20 17:00",
      "calculation": "the MT5 data export",
      "figure": "images/img03_bullish.png"
    },
    "fig3_p2_close_gap": {
      "value": 0.003549999999999942,
      "display": "0.00355",
      "unit": "USD per EUR",
      "meaning": "Close of the pivot 2 bar minus its low",
      "source": [
        "data/derived.csv:2819",
        "data/derived.csv:2819"
      ],
      "check": {
        "csv": "data/derived.csv",
        "minus": [
          [
            "close",
            2817
          ],
          [
            "low",
            2817
          ]
        ],
        "sign": 1,
        "format": "price"
      },
      "symbol": "EURUSD",
      "timeframe": "H1",
      "bar_time": [
        "2026-05-20 17:00",
        "2026-05-20 17:00"
      ],
      "calculation": [
        "the MT5 data export",
        "the article build"
      ],
      "figure": "images/img03_bullish.png"
    },
    "fig3_p2_change": {
      "value": 0.0027199999999998337,
      "display": "0.00272",
      "unit": "USD per EUR",
      "meaning": "Close-to-close change on the pivot 2 bar (positive: a gain for RSI)",
      "source": [
        "data/derived.csv:2819",
        "data/derived.csv:2818"
      ],
      "check": {
        "csv": "data/derived.csv",
        "minus": [
          [
            "close",
            2817
          ],
          [
            "close",
            2816
          ]
        ],
        "sign": 1,
        "format": "price"
      },
      "symbol": "EURUSD",
      "timeframe": "H1",
      "bar_time": [
        "2026-05-20 17:00",
        "2026-05-20 16:00"
      ],
      "calculation": [
        "the MT5 data export",
        "the article build"
      ],
      "figure": "images/img03_bullish.png"
    },
    "fig3_beyond_time": {
      "value": "2026-05-21 16:00",
      "display": "2026-05-21 16:00",
      "unit": "terminal time",
      "meaning": "First bar within 24 bars after confirmation with a low below pivot 2",
      "source": "data/derived.csv:2842",
      "check": {
        "csv": "data/derived.csv",
        "row": 2840,
        "column": "terminal_time",
        "format": "text"
      },
      "symbol": "EURUSD",
      "timeframe": "H1",
      "bar_time": "2026-05-21 16:00",
      "calculation": "the reference calculation",
      "figure": "images/img03_bullish.png"
    },
    "fig3_beyond_low": {
      "value": 1.15757,
      "display": "1.15757",
      "unit": "USD per EUR",
      "meaning": "Low of that bar",
      "source": "data/derived.csv:2842",
      "check": {
        "csv": "data/derived.csv",
        "row": 2840,
        "column": "low",
        "format": "price"
      },
      "symbol": "EURUSD",
      "timeframe": "H1",
      "bar_time": "2026-05-21 16:00",
      "calculation": "the MT5 data export",
      "figure": "images/img03_bullish.png"
    },
    "fig3_beyond_bars": {
      "value": 18,
      "display": "18",
      "unit": "bars",
      "meaning": "Bars between the confirming bar and that bar",
      "source": "data/charts.json:charts.bullish.first_bar_beyond_pivot2_within_24.bars_after_confirm",
      "check": {
        "json": "data/charts.json",
        "path": "charts.bullish.first_bar_beyond_pivot2_within_24.bars_after_confirm",
        "format": "int"
      },
      "figure": "images/img03_bullish.png",
      "symbol": "EURUSD",
      "timeframe": "H1",
      "window": "2026-05-19 23:00 to 2026-05-21 22:00",
      "calculation": "the chart generation"
    },
    "fig4_p1_time": {
      "value": "2026-04-06 10:00",
      "display": "2026-04-06 10:00",
      "unit": "terminal time",
      "meaning": "Pivot 1 bar",
      "source": "data/derived.csv:2044",
      "check": {
        "csv": "data/derived.csv",
        "row": 2042,
        "column": "terminal_time",
        "format": "text"
      },
      "symbol": "EURUSD",
      "timeframe": "H1",
      "bar_time": "2026-04-06 10:00",
      "calculation": "the reference calculation",
      "figure": "images/img04_failed.png"
    },
    "fig4_p1_price": {
      "value": 1.15682,
      "display": "1.15682",
      "unit": "USD per EUR",
      "meaning": "Pivot 1 high",
      "source": "data/derived.csv:2044",
      "check": {
        "csv": "data/derived.csv",
        "row": 2042,
        "column": "high",
        "format": "price"
      },
      "symbol": "EURUSD",
      "timeframe": "H1",
      "bar_time": "2026-04-06 10:00",
      "calculation": "the MT5 data export",
      "figure": "images/img04_failed.png"
    },
    "fig4_p1_rsi": {
      "value": 71.10757024193043,
      "display": "71.11",
      "unit": "RSI points",
      "meaning": "RSI at pivot 1",
      "source": "data/derived.csv:2044",
      "check": {
        "csv": "data/derived.csv",
        "row": 2042,
        "column": "rsi",
        "format": "rsi"
      },
      "symbol": "EURUSD",
      "timeframe": "H1",
      "bar_time": "2026-04-06 10:00",
      "calculation": "the reference calculation",
      "figure": "images/img04_failed.png"
    },
    "fig4_p2_time": {
      "value": "2026-04-06 17:00",
      "display": "2026-04-06 17:00",
      "unit": "terminal time",
      "meaning": "Pivot 2 bar",
      "source": "data/derived.csv:2051",
      "check": {
        "csv": "data/derived.csv",
        "row": 2049,
        "column": "terminal_time",
        "format": "text"
      },
      "symbol": "EURUSD",
      "timeframe": "H1",
      "bar_time": "2026-04-06 17:00",
      "calculation": "the reference calculation",
      "figure": "images/img04_failed.png"
    },
    "fig4_p2_price": {
      "value": 1.1571,
      "display": "1.15710",
      "unit": "USD per EUR",
      "meaning": "Pivot 2 high",
      "source": "data/derived.csv:2051",
      "check": {
        "csv": "data/derived.csv",
        "row": 2049,
        "column": "high",
        "format": "price"
      },
      "symbol": "EURUSD",
      "timeframe": "H1",
      "bar_time": "2026-04-06 17:00",
      "calculation": "the MT5 data export",
      "figure": "images/img04_failed.png"
    },
    "fig4_p2_rsi": {
      "value": 53.22911110032791,
      "display": "53.23",
      "unit": "RSI points",
      "meaning": "RSI at pivot 2",
      "source": "data/derived.csv:2051",
      "check": {
        "csv": "data/derived.csv",
        "row": 2049,
        "column": "rsi",
        "format": "rsi"
      },
      "symbol": "EURUSD",
      "timeframe": "H1",
      "bar_time": "2026-04-06 17:00",
      "calculation": "the reference calculation",
      "figure": "images/img04_failed.png"
    },
    "fig4_confirm_clock": {
      "value": "22:00",
      "display": "22:00",
      "unit": "terminal time (clock)",
      "meaning": "Open time of the confirming bar",
      "source": "data/derived.csv:2056",
      "check": {
        "csv": "data/derived.csv",
        "row": 2054,
        "column": "terminal_time",
        "format": "clock"
      },
      "symbol": "EURUSD",
      "timeframe": "H1",
      "bar_time": "2026-04-06 22:00",
      "calculation": "the reference calculation",
      "figure": "images/img04_failed.png"
    },
    "fig4_rsi_gap": {
      "value": 17.87845914160252,
      "display": "17.88",
      "unit": "RSI points",
      "meaning": "Absolute RSI difference between the pivots",
      "source": [
        "data/derived.csv:2044",
        "data/derived.csv:2051"
      ],
      "check": {
        "csv": "data/derived.csv",
        "minus": [
          [
            "rsi",
            2042
          ],
          [
            "rsi",
            2049
          ]
        ],
        "sign": 0,
        "format": "rsi"
      },
      "figure": "images/img04_failed.png",
      "symbol": "EURUSD",
      "timeframe": "H1",
      "window": "2026-04-03 22:00 to 2026-04-07 22:00",
      "calculation": [
        "the reference calculation",
        "the article build"
      ]
    },
    "fig4_beyond_time": {
      "value": "2026-04-07 11:00",
      "display": "2026-04-07 11:00",
      "unit": "terminal time",
      "meaning": "First bar within 24 bars after confirmation with a high above pivot 2",
      "source": "data/derived.csv:2069",
      "check": {
        "csv": "data/derived.csv",
        "row": 2067,
        "column": "terminal_time",
        "format": "text"
      },
      "symbol": "EURUSD",
      "timeframe": "H1",
      "bar_time": "2026-04-07 11:00",
      "calculation": "the reference calculation",
      "figure": "images/img04_failed.png"
    },
    "fig4_beyond_high": {
      "value": 1.15751,
      "display": "1.15751",
      "unit": "USD per EUR",
      "meaning": "High of that bar",
      "source": "data/derived.csv:2069",
      "check": {
        "csv": "data/derived.csv",
        "row": 2067,
        "column": "high",
        "format": "price"
      },
      "symbol": "EURUSD",
      "timeframe": "H1",
      "bar_time": "2026-04-07 11:00",
      "calculation": "the MT5 data export",
      "figure": "images/img04_failed.png"
    },
    "fig4_beyond_bars": {
      "value": 13,
      "display": "13",
      "unit": "bars",
      "meaning": "Bars between the confirming bar and that bar",
      "source": "data/charts.json:charts.failed.first_bar_beyond_pivot2_within_24.bars_after_confirm",
      "check": {
        "json": "data/charts.json",
        "path": "charts.failed.first_bar_beyond_pivot2_within_24.bars_after_confirm",
        "format": "int"
      },
      "figure": "images/img04_failed.png",
      "symbol": "EURUSD",
      "timeframe": "H1",
      "window": "2026-04-03 22:00 to 2026-04-07 22:00",
      "calculation": "the chart generation"
    },
    "fig4_dip_low": {
      "value": 1.15237,
      "display": "1.15237",
      "unit": "USD per EUR",
      "meaning": "Lowest low between the confirming bar and the first higher high",
      "source": "data/derived.csv:2063",
      "check": {
        "csv": "data/derived.csv",
        "range_min": "low",
        "rows": [
          2055,
          2066
        ],
        "format": "price"
      },
      "symbol": "EURUSD",
      "timeframe": "H1",
      "bar_time": "2026-04-07 05:00",
      "calculation": "the MT5 data export",
      "figure": "images/img04_failed.png",
      "range_rows": [
        2055,
        2066
      ]
    },
    "fig4_dip_time": {
      "value": "2026-04-07 05:00",
      "display": "2026-04-07 05:00",
      "unit": "terminal time",
      "meaning": "Bar of that lowest low",
      "source": "data/derived.csv:2063",
      "check": {
        "csv": "data/derived.csv",
        "range_min": "low",
        "rows": [
          2055,
          2066
        ],
        "format": "argmin_time"
      },
      "symbol": "EURUSD",
      "timeframe": "H1",
      "bar_time": "2026-04-07 05:00",
      "calculation": "the reference calculation",
      "figure": "images/img04_failed.png"
    },
    "fig5_p2_time": {
      "value": "2026-09-24 05:00",
      "display": "2026-09-24 05:00",
      "unit": "terminal time",
      "meaning": "Pivot 2 bar of figure 5",
      "source": "data/derived.csv:4991",
      "check": {
        "csv": "data/derived.csv",
        "row": 4989,
        "column": "terminal_time",
        "format": "text"
      },
      "symbol": "EURUSD",
      "timeframe": "H1",
      "bar_time": "2026-09-24 05:00",
      "calculation": "the reference calculation",
      "figure": "images/img05_confirmation_lag.png"
    },
    "fig5_p2_closes": {
      "value": "06:00",
      "display": "06:00",
      "unit": "terminal time (clock)",
      "meaning": "Time at which the pivot 2 bar closes (open time + 1 hour)",
      "source": "data/derived.csv:4991",
      "check": {
        "csv": "data/derived.csv",
        "row": 4989,
        "column": "terminal_time",
        "format": "closes_at"
      },
      "symbol": "EURUSD",
      "timeframe": "H1",
      "bar_time": "2026-09-24 05:00",
      "calculation": "the reference calculation",
      "figure": "images/img05_confirmation_lag.png"
    },
    "fig5_confirm_clock": {
      "value": "10:00",
      "display": "10:00",
      "unit": "terminal time (clock)",
      "meaning": "Open time of the confirming bar",
      "source": "data/derived.csv:4996",
      "check": {
        "csv": "data/derived.csv",
        "row": 4994,
        "column": "terminal_time",
        "format": "clock"
      },
      "symbol": "EURUSD",
      "timeframe": "H1",
      "bar_time": "2026-09-24 10:00",
      "calculation": "the reference calculation",
      "figure": "images/img05_confirmation_lag.png"
    },
    "fig5_confirm_closes": {
      "value": "11:00",
      "display": "11:00",
      "unit": "terminal time (clock)",
      "meaning": "Time at which the confirming bar closes",
      "source": "data/derived.csv:4996",
      "check": {
        "csv": "data/derived.csv",
        "row": 4994,
        "column": "terminal_time",
        "format": "closes_at"
      },
      "symbol": "EURUSD",
      "timeframe": "H1",
      "bar_time": "2026-09-24 10:00",
      "calculation": "the reference calculation",
      "figure": "images/img05_confirmation_lag.png"
    },
    "fig5_p2_low": {
      "value": 1.13683,
      "display": "1.13683",
      "unit": "USD per EUR",
      "meaning": "Pivot 2 low of figure 5",
      "source": "data/derived.csv:4991",
      "check": {
        "csv": "data/derived.csv",
        "row": 4989,
        "column": "low",
        "format": "price"
      },
      "symbol": "EURUSD",
      "timeframe": "H1",
      "bar_time": "2026-09-24 05:00",
      "calculation": "the MT5 data export",
      "figure": "images/img05_confirmation_lag.png"
    },
    "fig5_after_bars": {
      "value": 5,
      "display": "5",
      "unit": "bars",
      "meaning": "Exported bars after the confirming bar",
      "source": "data/charts.json:charts.confirmation_lag.bars_after_confirm_in_export",
      "check": {
        "json": "data/charts.json",
        "path": "charts.confirmation_lag.bars_after_confirm_in_export",
        "format": "int"
      },
      "figure": "images/img05_confirmation_lag.png",
      "symbol": "EURUSD",
      "timeframe": "H1",
      "window": "2026-09-23 14:00 to 2026-09-24 15:00",
      "calculation": "the chart generation"
    },
    "fig5_lowest_low": {
      "value": 1.13611,
      "display": "1.13611",
      "unit": "USD per EUR",
      "meaning": "Lowest low after the confirming bar within the export",
      "source": "data/derived.csv:4999",
      "check": {
        "csv": "data/derived.csv",
        "range_min": "low",
        "rows": [
          4995,
          4999
        ],
        "format": "price"
      },
      "symbol": "EURUSD",
      "timeframe": "H1",
      "bar_time": "2026-09-24 13:00",
      "calculation": "the MT5 data export",
      "figure": "images/img05_confirmation_lag.png"
    },
    "fig5_lowest_clock": {
      "value": "13:00",
      "display": "13:00",
      "unit": "terminal time (clock)",
      "meaning": "Open time of the bar with that low",
      "source": "data/derived.csv:4999",
      "check": {
        "csv": "data/derived.csv",
        "row": 4997,
        "column": "terminal_time",
        "format": "clock"
      },
      "symbol": "EURUSD",
      "timeframe": "H1",
      "bar_time": "2026-09-24 13:00",
      "calculation": "the reference calculation",
      "figure": "images/img05_confirmation_lag.png"
    },
    "rsi_max_error": {
      "value": 4.973799150320701e-14,
      "display": "4.97e-14",
      "unit": "RSI points",
      "meaning": "Largest |MQL - pandas| RSI difference over all compared values",
      "source": "data/crosscheck.json:rsi.max_abs_error_points",
      "check": {
        "json": "data/crosscheck.json",
        "path": "rsi.max_abs_error_points",
        "format": "sci2"
      },
      "symbol": "EURUSD",
      "timeframe": "H1",
      "window": "2025-12-04 08:00 to 2026-09-24 15:00",
      "calculation": "the cross-check"
    },
    "rsi_bit_identical": {
      "value": 2139,
      "display": "2,139",
      "unit": "values",
      "meaning": "RSI values identical to the last bit",
      "source": "data/crosscheck.json:rsi.bit_identical_values",
      "check": {
        "json": "data/crosscheck.json",
        "path": "rsi.bit_identical_values",
        "format": "int"
      },
      "symbol": "EURUSD",
      "timeframe": "H1",
      "window": "2025-12-04 08:00 to 2026-09-24 15:00",
      "calculation": "the cross-check"
    },
    "rsi_tolerance": {
      "value": 1e-09,
      "display": "1e-9",
      "unit": "RSI points",
      "meaning": "Pass tolerance for the RSI comparison (justified in the cross-check)",
      "source": [
        "data/crosscheck.json:tolerance.rsi_points",
        "the cross-check"
      ],
      "check": {
        "json": "data/crosscheck.json",
        "path": "tolerance.rsi_points",
        "format": "sci0"
      }
    },
    "fp_noise": {
      "value": 1e-13,
      "display": "1e-13",
      "unit": "RSI points",
      "meaning": "Expected floating-point disagreement: about 25 x a relative error of roughly 1e-15 in the averages",
      "source": "the cross-check"
    },
    "replay_bars": {
      "value": 5000,
      "display": "5,000",
      "unit": "bars",
      "meaning": "Bars replayed one at a time by the native harness (1 to n, each with an intermediate and a final tick)",
      "source": [
        "the native harness preparation",
        "data/native-run.json:checks"
      ],
      "check": {
        "json": "data/native-run.json",
        "path": "markers.ontester_result",
        "format": "int"
      }
    },
    "native_checks_passed": {
      "value": 41,
      "display": "41",
      "unit": "checks",
      "meaning": "Native MQL5 harness checks passed",
      "source": "data/native-run.json:checks_passed",
      "check": {
        "json": "data/native-run.json",
        "path": "checks_passed",
        "format": "int"
      }
    },
    "native_checks_total": {
      "value": 41,
      "display": "41",
      "unit": "checks",
      "meaning": "Native MQL5 harness checks run",
      "source": [
        "data/native-run.json:checks_passed",
        "data/native-run.json:checks_failed"
      ],
      "check": {
        "json": "data/native-run.json",
        "path": "checks",
        "format": "len"
      }
    },
    "crosscheck_passed": {
      "value": 24,
      "display": "24",
      "unit": "checks",
      "meaning": "Cross-check comparisons that passed",
      "source": "data/crosscheck.json:checks",
      "check": {
        "json": "data/crosscheck.json",
        "path": "checks",
        "format": "count_pass"
      }
    },
    "crosscheck_total": {
      "value": 24,
      "display": "24",
      "unit": "checks",
      "meaning": "Cross-check comparisons run",
      "source": "data/crosscheck.json:checks",
      "check": {
        "json": "data/crosscheck.json",
        "path": "checks",
        "format": "len"
      }
    },
    "compile_result": {
      "value": "Result: 0 errors, 0 warnings, 382 ms elapsed, cpu='X64 Regular'",
      "display": "0 errors, 0 warnings",
      "unit": "compiler result",
      "meaning": "MetaEditor64 result for the current .mq5 (log tail)",
      "source": [
        "data/compile-BrokerCheck_RSI_Divergence.json:log_tail",
        "downloads/BrokerCheck_RSI_Divergence.log"
      ],
      "check": {
        "json": "data/compile-BrokerCheck_RSI_Divergence.json",
        "path": "log_tail",
        "format": "compile_result"
      },
      "source_sha256": "691253453e04e5a8adf1a19f8cec501f7bb2208a6f7ec61a07cc52367f48e14d",
      "binary_sha256": "6ba9d20cf53d015ccd4ef89297165376a961ff96e66fc6cce56cfe2cd0c9e20a"
    }
  },
  "charts": {
    "note": "Every text drawn into the five PNGs, with the values behind it. Times are terminal time (trade-server clock).",
    "raster": {
      "width": 1920,
      "height": 1080,
      "dpi": 120,
      "figsize_inches": [
        16.0,
        9.0
      ]
    },
    "logo": {
      "file": "images/brokercheck-logo.png",
      "sha256": "1d03a555099eb04c3a419d51bb544afccf8f7c9014440d6e3a2937083167dc36",
      "position_figure_fraction": [
        0.765,
        0.852,
        0.167,
        0.052
      ],
      "backing": "opaque white rectangle 0.760,0.846 size 0.178x0.065"
    },
    "selection_constants": {
      "context_bars_before_pivot1": 12,
      "context_bars_after_confirm": 24,
      "overview_bars": 240,
      "lag_max_pivot_distance": 30
    },
    "charts": {
      "overview": {
        "title": "Detector output on the last 240 hourly bars",
        "subtitle": "EURUSD · H1 · RSI 14 (Wilder, close) · pivots 5 left / 5 right · terminal time",
        "info_text": [
          "A  bullish: 10 Sep 23:00 / 11 Sep 15:00, confirmed 11 Sep 20:00      B  bullish: 16 Sep 04:00 / 16 Sep 15:00, confirmed 16 Sep 20:00",
          "C  bullish: 22 Sep 00:00 / 22 Sep 11:00, confirmed 22 Sep 16:00      D  bullish: 23 Sep 20:00 / 24 Sep 05:00, confirmed 24 Sep 10:00"
        ],
        "detections": [
          {
            "type": "regular_bullish",
            "p1_index": 4767,
            "p2_index": 4783,
            "confirm_index": 4788,
            "p1_time": "2026-09-10 23:00",
            "p2_time": "2026-09-11 15:00",
            "confirm_time": "2026-09-11 20:00",
            "confirm_bar_closes": "21:00",
            "price_p1": "1.16049",
            "price_p2": "1.15687",
            "rsi_p1": "37.93",
            "rsi_p2": "44.02",
            "rsi_gap": "6.08",
            "bars_between_pivots": 16,
            "close_at_confirm": "1.15976",
            "rsi_at_confirm": "41.61",
            "source": "data/divergences.csv (identical to data/mql5-divergences.csv per data/crosscheck.json)"
          },
          {
            "type": "regular_bullish",
            "p1_index": 4844,
            "p2_index": 4855,
            "confirm_index": 4860,
            "p1_time": "2026-09-16 04:00",
            "p2_time": "2026-09-16 15:00",
            "confirm_time": "2026-09-16 20:00",
            "confirm_bar_closes": "21:00",
            "price_p1": "1.15312",
            "price_p2": "1.15277",
            "rsi_p1": "38.99",
            "rsi_p2": "42.56",
            "rsi_gap": "3.57",
            "bars_between_pivots": 11,
            "close_at_confirm": "1.15385",
            "rsi_at_confirm": "49.03",
            "source": "data/divergences.csv (identical to data/mql5-divergences.csv per data/crosscheck.json)"
          },
          {
            "type": "regular_bullish",
            "p1_index": 4936,
            "p2_index": 4947,
            "confirm_index": 4952,
            "p1_time": "2026-09-22 00:00",
            "p2_time": "2026-09-22 11:00",
            "confirm_time": "2026-09-22 16:00",
            "confirm_bar_closes": "17:00",
            "price_p1": "1.14608",
            "price_p2": "1.14333",
            "rsi_p1": "37.77",
            "rsi_p2": "42.01",
            "rsi_gap": "4.24",
            "bars_between_pivots": 11,
            "close_at_confirm": "1.14530",
            "rsi_at_confirm": "40.55",
            "source": "data/divergences.csv (identical to data/mql5-divergences.csv per data/crosscheck.json)"
          },
          {
            "type": "regular_bullish",
            "p1_index": 4980,
            "p2_index": 4989,
            "confirm_index": 4994,
            "p1_time": "2026-09-23 20:00",
            "p2_time": "2026-09-24 05:00",
            "confirm_time": "2026-09-24 10:00",
            "confirm_bar_closes": "11:00",
            "price_p1": "1.13696",
            "price_p2": "1.13683",
            "rsi_p1": "33.02",
            "rsi_p2": "35.89",
            "rsi_gap": "2.87",
            "bars_between_pivots": 9,
            "close_at_confirm": "1.13924",
            "rsi_at_confirm": "47.77",
            "source": "data/divergences.csv (identical to data/mql5-divergences.csv per data/crosscheck.json)"
          }
        ],
        "counts": {
          "regular_bearish": 0,
          "regular_bullish": 4
        },
        "selection_rule": "Selection rule (newest 240 exported bars; every regular detection whose pivots and confirming bar are inside)",
        "file": "images/img01_overview.png",
        "width": 1920,
        "height": 1080,
        "sha256": "9677f5ab812bf41aedde44e83c9f3961d648140e44fe8a60939f89c334fb5f0b",
        "window": {
          "first_index": 4760,
          "last_index": 4999,
          "bars": 240,
          "first_bar": "2026-09-10 16:00",
          "last_bar": "2026-09-24 15:00",
          "derived_csv_lines": "data/derived.csv lines 4762-5001"
        },
        "x_tick_labels": [
          "10 Sep 16:00",
          "14 Sep 15:00",
          "16 Sep 15:00",
          "18 Sep 15:00",
          "22 Sep 15:00",
          "24 Sep 15:00"
        ],
        "footer_text": [
          "4 regular bullish and 0 regular bearish detections at default settings · letter pairs mark pivots 1 and 2 · ▲ and dashed gold line: confirming bar",
          "Window 2026-09-10 16:00 to 2026-09-24 15:00 · MT5 terminal export, closed bars only · terminal time was UTC+3 at capture · gaps compressed (faint vertical line)"
        ],
        "price_axis_label": "USD per EUR",
        "rsi_axis_label": "RSI 14",
        "price_tick_labels": [
          "1.1350",
          "1.1400",
          "1.1450",
          "1.1500",
          "1.1550",
          "1.1600",
          "1.1650"
        ],
        "rsi_tick_labels": [
          "0",
          "30",
          "70",
          "100"
        ],
        "price_axis_limits": [
          "1.13179",
          "1.16903"
        ]
      },
      "bearish": {
        "type": "regular_bearish",
        "p1_index": 4532,
        "p2_index": 4545,
        "confirm_index": 4550,
        "p1_time": "2026-08-28 04:00",
        "p2_time": "2026-08-28 17:00",
        "confirm_time": "2026-08-28 22:00",
        "confirm_bar_closes": "23:00",
        "price_p1": "1.16549",
        "price_p2": "1.16588",
        "rsi_p1": "47.82",
        "rsi_p2": "28.83",
        "rsi_gap": "18.99",
        "bars_between_pivots": 13,
        "close_at_confirm": "1.15853",
        "rsi_at_confirm": "23.57",
        "source": "data/divergences.csv (identical to data/mql5-divergences.csv per data/crosscheck.json)",
        "title": "Regular bearish divergence: higher high, lower RSI",
        "subtitle": "EURUSD · H1 · RSI 14 (Wilder, close) · pivots 5 left / 5 right · terminal time",
        "info_text": [
          "① Pivot 1  2026-08-28 04:00  high 1.16549  RSI 47.82        ② Pivot 2  2026-08-28 17:00  high 1.16588  RSI 28.83",
          "③ Confirmed when the 22:00 bar closed, 5 closed bars after ②  ·  close of that bar 1.15853"
        ],
        "selection_rule": "Selected by fixed rule: largest RSI gap between the pivots among regular bearish detections with 12 bars before ① and 24 after ③ (outcome not used)",
        "first_bar_beyond_pivot2_within_24": null,
        "file": "images/img02_bearish.png",
        "width": 1920,
        "height": 1080,
        "sha256": "b1f3749393ac87a9ed1ebc95544727f0bcba09727efadaf4f3b9877bc24247b0",
        "window": {
          "first_index": 4520,
          "last_index": 4574,
          "bars": 55,
          "first_bar": "2026-08-27 16:00",
          "last_bar": "2026-08-31 22:00",
          "derived_csv_lines": "data/derived.csv lines 4522-4576"
        },
        "x_tick_labels": [
          "27 Aug 16:00",
          "28 Aug 02:00",
          "28 Aug 13:00",
          "31 Aug 00:00",
          "31 Aug 11:00",
          "31 Aug 22:00"
        ],
        "footer_text": [
          "Selected by fixed rule: largest RSI gap between the pivots among regular bearish detections with 12 bars before ① and 24 after ③ (outcome not used)",
          "MT5 terminal export, closed bars only · terminal time was UTC+3 at capture · gaps compressed (faint vertical line) · dotted line: level of pivot ②"
        ],
        "price_axis_label": "USD per EUR",
        "rsi_axis_label": "RSI 14",
        "price_tick_labels": [
          "1.1580",
          "1.1600",
          "1.1620",
          "1.1640",
          "1.1660"
        ],
        "rsi_tick_labels": [
          "0",
          "30",
          "70",
          "100"
        ],
        "price_axis_limits": [
          "1.15617",
          "1.16778"
        ]
      },
      "bullish": {
        "type": "regular_bullish",
        "p1_index": 2811,
        "p2_index": 2817,
        "confirm_index": 2822,
        "p1_time": "2026-05-20 11:00",
        "p2_time": "2026-05-20 17:00",
        "confirm_time": "2026-05-20 22:00",
        "confirm_bar_closes": "23:00",
        "price_p1": "1.15830",
        "price_p2": "1.15821",
        "rsi_p1": "32.46",
        "rsi_p2": "58.68",
        "rsi_gap": "26.22",
        "bars_between_pivots": 6,
        "close_at_confirm": "1.16273",
        "rsi_at_confirm": "60.86",
        "source": "data/divergences.csv (identical to data/mql5-divergences.csv per data/crosscheck.json)",
        "title": "Regular bullish divergence: lower low, higher RSI",
        "subtitle": "EURUSD · H1 · RSI 14 (Wilder, close) · pivots 5 left / 5 right · terminal time",
        "info_text": [
          "① Pivot 1  2026-05-20 11:00  low 1.15830  RSI 32.46        ② Pivot 2  2026-05-20 17:00  low 1.15821  RSI 58.68",
          "③ Confirmed when the 22:00 bar closed, 5 closed bars after ②  ·  close of that bar 1.16273"
        ],
        "selection_rule": "Selected by fixed rule: largest RSI gap between the pivots among regular bullish detections with 12 bars before ① and 24 after ③ (outcome not used)",
        "first_bar_beyond_pivot2_within_24": {
          "index": 2840,
          "time": "2026-05-21 16:00",
          "bars_after_confirm": 18,
          "price": "1.15757"
        },
        "file": "images/img03_bullish.png",
        "width": 1920,
        "height": 1080,
        "sha256": "39a6d8f27f7738d50894f29aa278b0843be6cb147b054e87487df7ad04ad8022",
        "window": {
          "first_index": 2799,
          "last_index": 2846,
          "bars": 48,
          "first_bar": "2026-05-19 23:00",
          "last_bar": "2026-05-21 22:00",
          "derived_csv_lines": "data/derived.csv lines 2801-2848"
        },
        "x_tick_labels": [
          "19 May 23:00",
          "20 May 08:00",
          "20 May 17:00",
          "21 May 03:00",
          "21 May 12:00",
          "21 May 22:00"
        ],
        "footer_text": [
          "Selected by fixed rule: largest RSI gap between the pivots among regular bullish detections with 12 bars before ① and 24 after ③ (outcome not used)",
          "MT5 terminal export, closed bars only · terminal time was UTC+3 at capture · gaps compressed (faint vertical line) · dotted line: level of pivot ②"
        ],
        "price_axis_label": "USD per EUR",
        "rsi_axis_label": "RSI 14",
        "price_tick_labels": [
          "1.1580",
          "1.1600",
          "1.1620",
          "1.1640"
        ],
        "rsi_tick_labels": [
          "0",
          "30",
          "70",
          "100"
        ],
        "price_axis_limits": [
          "1.15647",
          "1.16598"
        ]
      },
      "failed": {
        "type": "regular_bearish",
        "p1_index": 2042,
        "p2_index": 2049,
        "confirm_index": 2054,
        "p1_time": "2026-04-06 10:00",
        "p2_time": "2026-04-06 17:00",
        "confirm_time": "2026-04-06 22:00",
        "confirm_bar_closes": "23:00",
        "price_p1": "1.15682",
        "price_p2": "1.15710",
        "rsi_p1": "71.11",
        "rsi_p2": "53.23",
        "rsi_gap": "17.88",
        "bars_between_pivots": 7,
        "close_at_confirm": "1.15423",
        "rsi_at_confirm": "52.47",
        "source": "data/divergences.csv (identical to data/mql5-divergences.csv per data/crosscheck.json)",
        "title": "Failed divergence: price later went above ②",
        "subtitle": "EURUSD · H1 · RSI 14 (Wilder, close) · pivots 5 left / 5 right · terminal time",
        "info_text": [
          "① Pivot 1  2026-04-06 10:00  high 1.15682  RSI 71.11        ② Pivot 2  2026-04-06 17:00  high 1.15710  RSI 53.23",
          "③ Confirmed when the 22:00 bar closed, 5 closed bars after ②      ④ First high above ②: 2026-04-07 11:00, high 1.15751, 13 bars after ③"
        ],
        "selection_rule": "Selected by fixed rule: largest RSI gap among regular detections not in figures 2–3 where price went beyond ② within 24 bars after ③",
        "first_bar_beyond_pivot2_within_24": {
          "index": 2067,
          "time": "2026-04-07 11:00",
          "bars_after_confirm": 13,
          "price": "1.15751"
        },
        "file": "images/img04_failed.png",
        "width": 1920,
        "height": 1080,
        "sha256": "b4ed3821769c18e58f16d4b47a715774791c44dcc7061ed0381ecb09e7f54887",
        "window": {
          "first_index": 2030,
          "last_index": 2078,
          "bars": 49,
          "first_bar": "2026-04-03 22:00",
          "last_bar": "2026-04-07 22:00",
          "derived_csv_lines": "data/derived.csv lines 2032-2080"
        },
        "x_tick_labels": [
          "03 Apr 22:00",
          "06 Apr 07:00",
          "06 Apr 17:00",
          "07 Apr 02:00",
          "07 Apr 12:00",
          "07 Apr 22:00"
        ],
        "footer_text": [
          "Selected by fixed rule: largest RSI gap among regular detections not in figures 2–3 where price went beyond ② within 24 bars after ③",
          "MT5 terminal export, closed bars only · terminal time was UTC+3 at capture · gaps compressed (faint vertical line) · dotted line: level of pivot ②"
        ],
        "price_axis_label": "USD per EUR",
        "rsi_axis_label": "RSI 14",
        "price_tick_labels": [
          "1.1500",
          "1.1520",
          "1.1540",
          "1.1560",
          "1.1580",
          "1.1600",
          "1.1620"
        ],
        "rsi_tick_labels": [
          "0",
          "30",
          "70",
          "100"
        ],
        "price_axis_limits": [
          "1.14891",
          "1.16222"
        ]
      },
      "confirmation_lag": {
        "type": "regular_bullish",
        "p1_index": 4980,
        "p2_index": 4989,
        "confirm_index": 4994,
        "p1_time": "2026-09-23 20:00",
        "p2_time": "2026-09-24 05:00",
        "confirm_time": "2026-09-24 10:00",
        "confirm_bar_closes": "11:00",
        "price_p1": "1.13696",
        "price_p2": "1.13683",
        "rsi_p1": "33.02",
        "rsi_p2": "35.89",
        "rsi_gap": "2.87",
        "bars_between_pivots": 9,
        "close_at_confirm": "1.13924",
        "rsi_at_confirm": "47.77",
        "source": "data/divergences.csv (identical to data/mql5-divergences.csv per data/crosscheck.json)",
        "title": "Confirmation lag: 5 closed bars after the swing",
        "subtitle": "EURUSD · H1 · RSI 14 (Wilder, close) · pivots 5 left / 5 right · terminal time",
        "info_text": [
          "① Pivot 1  2026-09-23 20:00  low 1.13696  RSI 33.02        ② Pivot 2  2026-09-24 05:00  low 1.13683  RSI 35.89",
          "② bar closes at 06:00  ·  the right side needs 5 more closed bars  ·  ③ known when the 10:00 bar closes at 11:00"
        ],
        "panel_text": [
          "5 closed bars after ②",
          "Line ①–② and ▲ appear only once ③ has closed; before that the indicator shows no divergence",
          "+1",
          "+2",
          "+3",
          "+4",
          "+5"
        ],
        "pivot2_bar_closes": "06:00",
        "lag_bars": 5,
        "bars_after_confirm_in_export": 5,
        "lowest_low_after_confirm_in_export": {
          "index": 4997,
          "time": "2026-09-24 13:00",
          "low": "1.13611"
        },
        "selection_rule": "Selection rule (most recent regular detection with pivots at most 30 bars apart)",
        "file": "images/img05_confirmation_lag.png",
        "width": 1920,
        "height": 1080,
        "sha256": "dbfb4ebcb7a4f21efd1abffbd00d2d37c0af21e2d551c46ad96c31eb73679930",
        "window": {
          "first_index": 4974,
          "last_index": 4999,
          "bars": 26,
          "first_bar": "2026-09-23 14:00",
          "last_bar": "2026-09-24 15:00",
          "derived_csv_lines": "data/derived.csv lines 4976-5001"
        },
        "x_tick_labels": [
          "23 Sep 14:00",
          "23 Sep 19:00",
          "24 Sep 00:00",
          "24 Sep 05:00",
          "24 Sep 10:00",
          "24 Sep 15:00"
        ],
        "footer_text": [
          "Selected by fixed rule: the most recent regular detection with pivots at most 30 bars apart · the export ends 5 bars after ③",
          "MT5 terminal export, closed bars only · terminal time was UTC+3 at capture · gaps compressed (faint vertical line) · dotted line: level of pivot ②"
        ],
        "price_axis_label": "USD per EUR",
        "rsi_axis_label": "RSI 14",
        "price_tick_labels": [
          "1.1360",
          "1.1380",
          "1.1400",
          "1.1420"
        ],
        "rsi_tick_labels": [
          "0",
          "30",
          "70",
          "100"
        ],
        "price_axis_limits": [
          "1.13518",
          "1.14321"
        ]
      }
    }
  },
  "claims": {
    "rsi_range_0_100": {
      "statement": "RSI ranges between 0 and 100",
      "source": "https://www.metatrader5.com/en/terminal/help/indicators/oscillators/rsi",
      "used_in": "What RSI measures"
    },
    "wilder_period_and_alternatives": {
      "statement": "Wilder recommended a 14-period RSI; the 9-period and 25-period versions have also gained popularity",
      "source": "https://www.metatrader5.com/en/terminal/help/indicators/oscillators/rsi",
      "used_in": "What RSI measures; Settings"
    },
    "tops_and_bottoms": {
      "statement": "RSI usually tops above 70 and bottoms below 30",
      "source": "https://www.metatrader5.com/en/terminal/help/indicators/oscillators/rsi",
      "used_in": "What RSI measures"
    },
    "divergence_definition": {
      "statement": "A divergence is a new price high or low not confirmed by a new RSI high or low",
      "source": "https://www.metatrader5.com/en/terminal/help/indicators/oscillators/rsi",
      "used_in": "What a divergence compares"
    },
    "reversal_statement_not_tested": {
      "statement": "This package does not test whether price reverses after a divergence; the examples include cases in which price moved past the second swing",
      "source": [
        "data/charts.json:charts.failed.first_bar_beyond_pivot2_within_24"
      ],
      "used_in": "What a divergence compares; FAQ"
    },
    "rsi_formula_average_unspecified": {
      "statement": "The help gives RSI = 100 - (100 / (1 + U / D)) with U and D the average positive and negative changes, without naming the averaging method",
      "source": "https://www.metatrader5.com/en/terminal/help/indicators/oscillators/rsi",
      "used_in": "How this download calculates RSI"
    },
    "smma_recursion": {
      "statement": "Smoothed moving average: first value is the simple mean; later values are (previous * (N - 1) + value) / N",
      "source": "https://www.metatrader5.com/en/terminal/help/indicators/trend_indicators/ma",
      "used_in": "How this download calculates RSI"
    },
    "other_rsi_readings": {
      "statement": "The help also lists tops and bottoms, chart formations, failure swings and support and resistance levels as RSI readings",
      "source": "https://www.metatrader5.com/en/terminal/help/indicators/oscillators/rsi",
      "used_in": "Combining with other tools"
    },
    "prev_calculated_zero_on_data_change": {
      "statement": "When price data changed since the last call (for example deeper history downloaded), the terminal sets prev_calculated to zero, so the indicator recalculates from scratch",
      "source": [
        "https://www.mql5.com/en/docs/event_handlers/oncalculate",
        "downloads/BrokerCheck_RSI_Divergence.mq5:288"
      ],
      "used_in": "Does it repaint?; FAQ"
    },
    "seed_gap_decays": {
      "statement": "With the same inputs, two Wilder averages that started from different values differ by a gap that is multiplied by (N - 1) / N on every bar",
      "source": "downloads/BrokerCheck_RSI_Divergence.mq5:317-323",
      "used_in": "Seed and warm-up; FAQ"
    },
    "harness_runs_exact_section": {
      "statement": "The harness compiles the calculation section of the .mq5 file unchanged except for renaming OnCalculate",
      "source": [
        "data/harness-source.json:rename",
        "data/harness-source.json:indicator_calculation_section_sha256",
        "the native harness preparation"
      ],
      "used_in": "What was checked"
    },
    "mq4_same_calc_section": {
      "statement": "The .mq4 and .mq5 files share the identical calculation section; only the platform setup differs",
      "source": [
        "the indicator generation",
        "the calculation validation"
      ],
      "used_in": "Download cards; FAQ"
    },
    "export_skips_current_bar": {
      "statement": "Position zero is the current bar; the export starts at position 1",
      "source": [
        "https://www.mql5.com/en/docs/python_metatrader5/mt5copyratesfrompos_py",
        "the MT5 data export"
      ],
      "used_in": "Sources"
    },
    "math_tester_mode": {
      "statement": "The math calculations test mode runs OnInit, OnTester and OnDeinit without ticks or history",
      "source": [
        "https://www.mql5.com/en/docs/runtime/testing",
        "data/native-run.json:ini"
      ],
      "used_in": "What was checked"
    },
    "pandas_ewm_recursion": {
      "statement": "ewm(adjust=False) computes y = (1 - alpha) * y_prev + alpha * x",
      "source": [
        "https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.ewm.html",
        "the reference calculation"
      ],
      "used_in": "What was checked"
    },
    "install_data_folder": {
      "statement": "The data folder opens from File > Open Data Folder and holds the custom indicator folders",
      "source": "https://www.metatrader5.com/en/metaeditor/help/structure",
      "used_in": "Use the indicator"
    },
    "install_indicators_folder_f7": {
      "statement": "Indicators are stored in MQL5/Indicators; F7 in MetaEditor compiles the source into an .ex5 file",
      "source": "https://www.metatrader5.com/en/terminal/help/algotrading/autotrading",
      "used_in": "Use the indicator"
    },
    "install_navigator_separate_window": {
      "statement": "Indicators are dragged from the Navigator window; oscillators open in a separate window with their own scale",
      "source": "https://www.metatrader5.com/en/terminal/help/charts_analysis/indicators",
      "used_in": "Use the indicator"
    },
    "close_prices_wilder": {
      "statement": "The download uses close prices and Wilder smoothing",
      "source": "downloads/BrokerCheck_RSI_Divergence.mq5:317-323",
      "used_in": "How this download calculates RSI"
    },
    "seed_rule": {
      "statement": "Seed: simple mean of the first RsiPeriod changes stored at index RsiPeriod; earlier indexes empty",
      "source": "downloads/BrokerCheck_RSI_Divergence.mq5:288-308",
      "used_in": "Seed and warm-up"
    },
    "insufficient_history": {
      "statement": "With rates_total <= RsiPeriod nothing is drawn and OnCalculate returns 0",
      "source": "downloads/BrokerCheck_RSI_Divergence.mq5:279-284",
      "used_in": "Seed and warm-up"
    },
    "zero_denominator": {
      "statement": "Zero average loss returns 100, or 50 when the average gain is also zero",
      "source": "downloads/BrokerCheck_RSI_Divergence.mq5:140-144",
      "used_in": "When nothing moves"
    },
    "pivot_rule_and_ties": {
      "statement": "Strict on the left, non-strict on the right; of two equal extremes within reach of each other, the earlier bar becomes the pivot",
      "source": "downloads/BrokerCheck_RSI_Divergence.mq5:176-198",
      "used_in": "Swing pivots"
    },
    "same_kind_spacing": {
      "statement": "Two pivots of the same kind are at least min(L, R) + 1 bars apart: a later pivot within R bars would exceed the earlier one on its right side, and an earlier pivot within L bars would block the later one on its left side",
      "source": [
        "downloads/BrokerCheck_RSI_Divergence.mq5:176-198"
      ],
      "used_in": "Pairs and the divergence test"
    },
    "consecutive_pairs_only": {
      "statement": "Only the previous pivot of the same kind within MaxPivotDistance is compared; RSI must exist at pivot 1",
      "source": [
        "downloads/BrokerCheck_RSI_Divergence.mq5:202-208",
        "downloads/BrokerCheck_RSI_Divergence.mq5:232"
      ],
      "used_in": "Pairs and the divergence test"
    },
    "strict_divergence_tests": {
      "statement": "All price and RSI comparisons are strict",
      "source": "downloads/BrokerCheck_RSI_Divergence.mq5:223-264",
      "used_in": "Pairs and the divergence test"
    },
    "closed_bar_confirmation_no_backdating": {
      "statement": "Only closed bars confirm; the arrow is written at c = p2 + PivotRightBars and the line at the same call",
      "source": [
        "downloads/BrokerCheck_RSI_Divergence.mq5:325-327",
        "downloads/BrokerCheck_RSI_Divergence.mq5:225"
      ],
      "used_in": "The confirmation lag"
    },
    "no_repaint_replay": {
      "statement": "Native bar-by-bar replay with intermediate ticks: signals appear only at the confirming bar and never change",
      "source": [
        "data/native-run.json:checks",
        "the native harness preparation"
      ],
      "used_in": "Does it repaint?; FAQ"
    },
    "show_hidden_checked_both_ways": {
      "statement": "Hidden divergences verified with ShowHidden on (cross-check) and off (native check of the default)",
      "source": [
        "data/crosscheck.json:checks",
        "data/native-run.json:checks"
      ],
      "used_in": "FAQ"
    },
    "larger_right_window_never_adds_pivots": {
      "statement": "A pivot for R + k right bars also satisfies the rule for R right bars, so a larger PivotRightBars can only remove pivots; each detection is reported R bars after its pivot 2",
      "source": "downloads/BrokerCheck_RSI_Divergence.mq5:176-198",
      "used_in": "Settings"
    },
    "native_only_no_trading": {
      "statement": "No orders, alerts, DLL imports, WebRequest or chart objects in the downloads",
      "source": [
        "downloads/BrokerCheck_RSI_Divergence.mq5",
        "downloads/BrokerCheck_RSI_Divergence.mq4",
        "the calculation validation"
      ],
      "used_in": "Download cards"
    },
    "mq4_static_only": {
      "statement": "The .mq4 file was not compiled or run: no MT4 terminal or MT4 MetaEditor is installed, and MetaEditor64 rejects .mq4 files",
      "source": [
        "data/preflight.json:mt4",
        "data/preflight.json:mql4_probe"
      ],
      "used_in": "Download cards; FAQ; Limitations"
    },
    "selection_rules": {
      "statement": "Figure windows come from fixed rules; figures 2-3 ignore outcomes; figure 4 selects a failure",
      "source": [
        "the chart generation"
      ],
      "used_in": "Interpreting the real examples"
    },
    "outcomes_after_examples": {
      "statement": "Figure 2: no high above pivot 2 within 24 bars after confirmation; figures 3-5: price went beyond pivot 2 afterwards",
      "source": [
        "data/charts.json:charts.bearish.first_bar_beyond_pivot2_within_24",
        "data/charts.json:charts.bullish.first_bar_beyond_pivot2_within_24",
        "data/charts.json:charts.failed.first_bar_beyond_pivot2_within_24",
        "data/charts.json:charts.confirmation_lag.lowest_low_after_confirm_in_export"
      ],
      "used_in": "Interpreting the real examples; FAQ; Combining with other tools"
    },
    "no_performance_claims": {
      "statement": "Counts describe this sample only; no hit rate, win rate or trading performance was tested",
      "source": "Definition of this guide: sample counts do not measure trading performance",
      "used_in": "What the sample shows; Limitations; FAQ; risk warning"
    },
    "dotted_level_line": {
      "statement": "Figures 2 to 5 draw a dotted line at the level of pivot 2",
      "source": [
        "data/charts.json:charts.bearish.footer_text",
        "data/charts.json:charts.confirmation_lag.footer_text",
        "the chart generation"
      ],
      "used_in": "Combining with other tools"
    },
    "terminal_time_convention": {
      "statement": "Bar times are exported as the terminal returns them (trade-server clock), without timezone conversion; the offset to UTC was measured at capture",
      "source": [
        "data/provenance.json:timestamp_convention",
        "data/provenance.json:time_offset_measurement"
      ],
      "used_in": "Meta line; Limitations; Sources"
    }
  }
}
