CAT researchOverviewEURUSDGBPUSDXAUUSDGBPCADEURCADAUDJPYGBPJPYResearch notes

ZTD Breakout Entry [ZV_BO] — a verified port under forward observation

Status (2026-09-16): a verified port, published as forward observation. The Python engine reproduces the indicator bar for bar against a TradingView export, and that is the whole of what has been established. There is no backtest record — no pre-registered test, no committed criteria, no graded sample. Nothing here is a hit rate.

What it is

A breakout entry on the 5- or 15-minute chart, armed only while a higher-timeframe divergence context is live. A ZTD (Zero-Touch Divergence, v22) engine runs on H1 and on H4; both are read every bar and CAT shows both on one card. A context arms from one of five entry sourcesdiv (an HTF divergence fire), div+poc (the same fire when its extreme sits in a naked-POC value area), Z+poc (an HTF AVWAP-Z extreme triangle on a naked POC), Z extreme (that triangle alone) and re (a re-entry after a stop, when a same-side triangle prints beyond it). The arm latches a reference level — the HTF signal high/low, grown with every later HTF and chart extreme — and disarms the other side.

On the chart timeframe a WaveRunner zigzag reduces price to swings and looks for a 1-2 breakout: for a sell, an earlier swing high H1, the swing low L1 under it, a lower high LH, and a sell-stop resting a buffer below L1; the buy side mirrors it. There is one simulated trade at a time; the order is re-placed every flat bar and fills on the wick. The target is HTF band (the opposite AVWAP-Z band on the context timeframe, trailing every bar, absent while it sits on the wrong side of the entry), Fixed RR, or Divergence (no target — an opposite-side HTF divergence closes the trade). The stop has six modes: LTF structure, HTF signal high/low, tighter of both, wider of both, structural main, trendline, with a Pips or ATR buffer. Source: ZV_BO_multitf_indicator.pine v1.13, catalogued bar by bar in docs/superpowers/specs/2026-09-16-zvbo-pine-semantics.md; port pyakao/src/pyakao/zvbo/.

The three rulings that shape what CAT runs

Confirmed bar. The indicator's own default is "Developing bar", which re-reads a partial HTF candle. The port implements the confirmed-bar variant only and refuses the other with an error. What CAT runs is the confirmed-bar ZV_BO, and the card says so.

TradingView's historical delivery. request.security(..., lookahead_off) has no intrabar value on history — a 5m 18:55 bar already carries the 1H 18:00 bar. So a closed HTF bar reaches the engine on the chart bar that closes it; the "developing" half of the Pine's tuple is the last delivered (closed) HTF bar, and the confirmed half is the row before it, one HTF bar older. Measured, not assumed: that phase matched TradingView on 100.0000% of bars in both configurations, against 91.7% / 93.8% for the port's first rule. The M30 and bias legs keep the older open-at-or-after rule, because the Pine reaches them by timeframe.change("30") and by a lookahead_on census with an internal [1].

The TPO layer is fed from M30. The naked daily and weekly POC zones come from the M30 history alone. A short zone inventory makes a Z+poc arm print as Z extreme (and div+poc as div) — same bar, same side, same levels, only the confluence tag differs. Feed the tracker as much 30-minute history as the venue gives.

What was verified

Against TradingView, on EURUSD, in two configurations (5m chart on the H1 context, 15m on the H4 context), over 22,300 and 22,348 comparable chart bars: 15 of the 28 data-window plots exact per configuration, 13 inside two documented export limits, 0 unexplained, both runs clean. The HTF half agrees to better than 1e-12, and the port fires 18 HTF divergences on the 5m/1H run and 10 on the 15m/4H run — exactly TradingView's counts, where an earlier build fired none. The 13 are export limits, each falsified by a probe: warm origin (the export begins mid-state, with counters no client buffer can reproduce — they agree on every per-bar increment instead) and zone origin (the pre-origin naked zones above; a deeper 30m feed takes the confluence tag to 100.000%). One deviation belongs to the run, not the port: the percentile calibration window was set to 500 on both sides, because the Pine caps its window to the HTF bars it has while the port's is fixed-width. Record: research/zvbo_golden_2026-09-16.md §7 and .superpowers/sdd/2026-09-16-zvbo-port/task-6b-report.md.

Quirks reproduced on purpose

The port is faithful to the Pine, including where the Pine surprises (semantics doc §12): invalOnRefBreak is inert (the reference grows to include the bar's own high before the close > reference test, so it would need close > high); the BUY early arm is suppressed for the whole leg after a bar that commits a swing high and a swing low together, which the SELL side cannot hit; a resting order can outlive its pattern, because the order block runs first and a setup that dies while the gate stays open leaves a stale order resting; a fill with lost geometry burns a trade number without opening a trade; and htfBarCount is not an HTF bar count — it can stall when consecutive HTF bars share their high, low and flags, yet the timeout and the arm latches are measured in it.

How CAT publishes it

zvbo runs as a member engine on M5 and M15 (default watch pair zvbo:M15; one read covers both contexts). A card shows both contexts; the lead is whichever is further up the ladder, H1 winning ties. The ladder is five rungs — context armed, pattern pending, order working, in position, exited — and "exited" shows only while it is recent: four hours of chart bars (48 on M5, 16 on M15), counted in bars so a weekend costs nothing, after which the read falls back to what is live. Every card states that this engine has no backtest record and links here, and every read is graded to its outcome like any other, so the record this note says is empty can start in public.

Open follow-ups

  • Only FX:EURUSD, only the two configurations, in the committed exports.
  • The zone inventory is the one thing left between the port and a byte-exact match, and it is not fixable against a client-side export; the Pine's percentile-calibration cap is not modelled either (which is why the golden runs at 500).
  • ZtdEngine.preview() has no ZV_BO caller any more; it is the hook if a live read ever wants a genuinely intrabar HTF value. The engine as it stands models history.
  • The "Developing bar" variant is not ported, and neither are the strategy twin's features (stacking, RR close-both, measured-move / Levels / Higher-band targets).