# Source audit for the v2.1 context layer

Audited 2026-09-08. This audit reads actual publicly released Pine source. It does not establish parity with a commercial indicator or turn a mechanical observation into a trade recommendation. [Retrieval metadata and full SHA-256 hashes](evidence/v2.1/reference-source-manifest.json) identify the public source snapshots. The working project's `_internal/reference-research-v2.1` keeps reference files separately; those third-party implementations are not bundled as product source.

| Reference | Fixed version | License | Source SHA-256 |
| --- | --- | --- | --- |
| Canto Open Source Fractal | `1bb53262deba9456f2b1a85d15c6ac5a5e880cf7`, 2026-08-25 | MIT | `c8fd910dd77b1aa754743d5126587fd3d0802e7bcbd14927c31600b20e114fc1` |
| fxraptor Fractal Model | `89fe497ea7f93b60c98dcff6c2bf9b1d29fa52fd`, 2026-08-16 | MPL-2.0 | `fa800979b29c88588bd19aa21a9db32e69a238f8ecfea5be7df56f2d5dec128a` |
| cephxs / CISD [base], fstarcapital | Public version `1.0`, 2026-08-30 | MPL-2.0, explicit source header | `219db913cf3cd9076bba58cf8086cd5021beaa15bdec537bbaaaaf1c0c0cf07e` |

Canto is the permissively licensed reference. The other two are useful source-level comparisons, but are not MIT code. No source from any of these references was transplanted into the product. The proposed context and IC modules are independently written from a documented behavioral contract. fxraptor imports `fstarcapital/AssetCorrelationUtils/12`; that dependency was not audited because it is outside the CISD/IC code examined here.

Cephxs was obtained through its ordinary public source endpoint, which returned `scriptAccess: open_no_auth`, not from an encrypted chart payload or a protected script. The pinned [public version 1 endpoint](https://pine-facade.tradingview.com/pine-facade/get/PUB%3Bfe869b5b0ae84425bb9646d30381ec61/1?no_4xx=true) and response are recorded with the [publication](https://www.tradingview.com/script/zzL17fzY-cephxs-CISD-base/). Its local line references below refer to `cephxs/cisd-base.pine` in the snapshot.

## A sweep is not yet a qualified model

Canto defaults the raw C1 sweep drawing to off and hardcodes `requireCisdToShow = true`. It records a setup separately from revealing its chart drawings; confirmation is a close through the selected CISD level. This is direct evidence for separating observation from prominence on the chart. [Inputs and gate, lines 46–93](https://github.com/cantolab/open-source-fractal/blob/1bb53262deba9456f2b1a85d15c6ac5a5e880cf7/openSourceFractal.pine#L46-L93), [creation/reveal, lines 508–546](https://github.com/cantolab/open-source-fractal/blob/1bb53262deba9456f2b1a85d15c6ac5a5e880cf7/openSourceFractal.pine#L508-L546).

fxraptor likewise distinguishes a wick beyond the reference from a reclaim and an actual CISD body break. Its live bearish setup becomes visible as triggered only when both reclaim and the tracked body break exist. With live display off, drawing additionally requires a post-C2 setup. [Reclaim and trigger, lines 1331–1357](https://github.com/fxraptor-alpha/pinescript-indicators/blob/89fe497ea7f93b60c98dcff6c2bf9b1d29fa52fd/fractal-model/fractal-model.pine#L1331-L1357), [live visibility, lines 2281–2286](https://github.com/fxraptor-alpha/pinescript-indicators/blob/89fe497ea7f93b60c98dcff6c2bf9b1d29fa52fd/fractal-model/fractal-model.pine#L2281-L2286).

**Product decision:** keep the raw setup ledger for reproducibility, but default the main chart to context-reviewed observations. Waiting, ambiguous and rejected observations need neutral styling and an explicit reason. Green/red directional prominence must not mean merely that a wick crossed a reference. Reclaim, CISD, closed HTF structure and a declared quality check are separate facts, with separate observation times. Passing these automated checks still leaves discretionary higher-timeframe POI and bias unknown.

## CISD origin and numerical noise filters

Canto updates its candidate while the running HTF extreme extends, using a short backward search and body transitions, including special doji and fallback rules. Its algorithm is not interchangeable with an arbitrary latest opposing candle. [Extreme/run selection, lines 709–749](https://github.com/cantolab/open-source-fractal/blob/1bb53262deba9456f2b1a85d15c6ac5a5e880cf7/openSourceFractal.pine#L709-L749).

fxraptor starts from the extreme candle, scans backward for the appropriate body direction, then walks the same-direction series to its earlier opening price; it explicitly skips doji bodies. [FindCISDLevel, lines 889–920](https://github.com/fxraptor-alpha/pinescript-indicators/blob/89fe497ea7f93b60c98dcff6c2bf9b1d29fa52fd/fractal-model/fractal-model.pine#L889-L920). This differs from the product's declared doji-ends-run rule and deserves a comparison fixture, not a silent semantic change.

Cephxs uses a 1-left/1-right pivot, then searches backward for the opposing consecutive body run. It scans the full origin-to-pivot interval for the wick extreme. In its actual code, the regular size filter requires `abs(origin open - run end close) >= ATR(14) * 0.5`; alternative multipliers are 0.1, 0.25, 0.66 and 1.0 (local lines 328–394, 476–486). This is a **run-size filter**, not proof of displacement on the confirming candle. The pending origin stays fixed when the run extends (398–409); the standard pending timeout is 10 bars, maximum preset 20 (275–276, 612–615). [Pinned source](https://pine-facade.tradingview.com/pine-facade/get/PUB%3Bfe869b5b0ae84425bb9646d30381ec61/1?no_4xx=true).

**Product decision:** keep provenance tied to the extreme-producing run. Add a separate, visible context review with configurable body/ATR, close-location and break-distance checks. A numerical V-shape test or chop limit is our operational definition; neither audited FM source proves a universal TTrades formula for it. Do not call a wick-only reclaim “displacement,” and do not imply that arbitrary threshold tuning reproduces a protected model.

## IC and protected swings are separate observations

The clearest actual IC implementation is fxraptor's `ICUpdate`, not its marketing text. It begins after the main CISD body-break bar, can calculate before the main setup is displayed, and draws only with the shown main setup. It does not require the whole HTF frame to begin after confirmation. [Eligibility, lines 1011–1038](https://github.com/fxraptor-alpha/pinescript-indicators/blob/89fe497ea7f93b60c98dcff6c2bf9b1d29fa52fd/fractal-model/fractal-model.pine#L1011-L1038).

Its independent continuation sequence is:

1. The next opposite-color body arms a fixed level at that body's open.
2. A later candle closes through that fixed level in the parent's direction.
3. A strict three-candle swing must exist within the leg. For a bullish continuation the middle low must be lower than both neighbors; the bearish case mirrors it. The confirming candle may supply the right neighbor.
4. The record fixes the level, start/confirmation bars and protected swing. A later wick through the swing marks it taken; its drawing becomes gray rather than being removed.

[Swing test, lines 970–993](https://github.com/fxraptor-alpha/pinescript-indicators/blob/89fe497ea7f93b60c98dcff6c2bf9b1d29fa52fd/fractal-model/fractal-model.pine#L970-L993), [arm/confirm, lines 1040–1082](https://github.com/fxraptor-alpha/pinescript-indicators/blob/89fe497ea7f93b60c98dcff6c2bf9b1d29fa52fd/fractal-model/fractal-model.pine#L1040-L1082), [taken state, lines 996–1008](https://github.com/fxraptor-alpha/pinescript-indicators/blob/89fe497ea7f93b60c98dcff6c2bf9b1d29fa52fd/fractal-model/fractal-model.pine#L996-L1008), [gray retained drawing, lines 2173–2181](https://github.com/fxraptor-alpha/pinescript-indicators/blob/89fe497ea7f93b60c98dcff6c2bf9b1d29fa52fd/fractal-model/fractal-model.pine#L2173-L2181).

The actual IC block does not require an FVG touch or a new higher/lower swing than the previous IC. A stale field comment suggests otherwise, but the implemented arm rule and comments at lines 922–928/1075 explicitly allow either relation. It stops on parent invalidation, C4 invalidation or the end of C4. A display toggle also gates calculation in this reference; the product should keep calculation independent from visibility. [IC rules and stop, lines 922–931](https://github.com/fxraptor-alpha/pinescript-indicators/blob/89fe497ea7f93b60c98dcff6c2bf9b1d29fa52fd/fractal-model/fractal-model.pine#L922-L931).

Cephxs separately calls a formation a **propulsion block** when its extreme lies inside an earlier same-direction CISD's level-to-pivot zone and the earlier confirmation existed by the new extreme. This is an order-block-like price interval, not an FVG. Its age test is `extremeBar - prior confirmationBar` between zero and the pending timeout (local lines 189–212). This supports causal parent-before-leg/extreme timing, but not renaming all early C2 CISDs as IC. [Pinned source](https://pine-facade.tradingview.com/pine-facade/get/PUB%3Bfe869b5b0ae84425bb9646d30381ec61/1?no_4xx=true).

**Product decision:** an IC record is a nested continuation observation associated with an already reviewed parent. Keep its anatomy and context review separate. Require parent knowledge before the opposing leg, a fixed opposing-run open, a later close-through and a then-confirmed strict local swing. If the product additionally requires an opposing wick across the current HTF open, prior-known parent FVG overlap and a decisive close, label those as conservative product checks. Missing POI evidence leaves the anatomy neutral. Preserve its failed/taken history. A swing's location time and the later time it became knowable are different fields.

The initial independent module intentionally allows only the first eligible opposing-leg attempt per parent per C3/C4 frame. An unfinished leg expires at the frame boundary; it does not continue across HTF candles. Formation and review are fixed at the formation close, so a later POI touch cannot upgrade an earlier neutral anatomy retroactively. Completed current-frame records remain as deduplication keys until the next frame; active/current-frame records may temporarily exceed the history cap. These limits are product scope, not claims about either reference's complete IC model.

## Inducement, lifecycle and source limitations

Cephxs' optional purge filter records a crossed same-side pivot and accepts a match within an absolute bar-distance tolerance; the default is off, tolerance 5 (local lines 174–187, 280–281, 488–544). This implements a local liquidity sweep filter. It does not establish intent, inducement, or a discretionary higher-timeframe POI. Do not label every local pivot sweep “inducement confirmed.” [Pinned source](https://pine-facade.tradingview.com/pine-facade/get/PUB%3Bfe869b5b0ae84425bb9646d30381ec61/1?no_4xx=true).

These public sources are comparisons, not infallible retention or realtime standards:

- Canto reveals labels retroactively at stored C2/C3/C4 locations. It also deletes the full setup when a CISD confirmed only during C4 and that C4 invalidates. Adopting that behavior would repeat the user's disappearing-history complaint. [Reveal, lines 490–523](https://github.com/cantolab/open-source-fractal/blob/1bb53262deba9456f2b1a85d15c6ac5a5e880cf7/openSourceFractal.pine#L490-L523), [deletion, lines 616–637](https://github.com/cantolab/open-source-fractal/blob/1bb53262deba9456f2b1a85d15c6ac5a5e880cf7/openSourceFractal.pine#L616-L637).
- fxraptor clears unconfirmed unreclaimed live C2s and can clear early CISD/IC state when a newer extreme changes the main anchor. This is different from preserving an append-only observation record. [Live C2 cleanup, lines 1197–1215](https://github.com/fxraptor-alpha/pinescript-indicators/blob/89fe497ea7f93b60c98dcff6c2bf9b1d29fa52fd/fractal-model/fractal-model.pine#L1197-L1215), [reset, lines 1334–1351](https://github.com/fxraptor-alpha/pinescript-indicators/blob/89fe497ea7f93b60c98dcff6c2bf9b1d29fa52fd/fractal-model/fractal-model.pine#L1334-L1351).
- Cephxs retains invalidated CISDs only with its historical option enabled. Its propulsion scan does not explicitly reject `is_invalidated`, although historical mode keeps such records in the array (local lines 200–212 versus 545–566). Its pending-confirmation block tests realtime `close` without an explicit `barstate.isconfirmed` guard (608–646). Thus static inspection supports possible intrabar provisional confirmation; the publication's non-repaint description alone is insufficient runtime evidence. These are review findings, not a claim that a complete native comparison was run.

**Product decision:** preserve frozen formation/confirmation events, and append withdrawal, taken or expiry observations. Default filtering must change visibility, not the source ledger. A completed-record capacity limit should be disclosed and evict only the oldest completed record, preserving active records. Record `knownAt` rather than implying that a confirmation existed at a previous swing.

## Required validation before parity claims

Use native Pine fixtures against the actual production functions, including: noisy one-tick sweep/reclaim; strong reversal versus a small body with a large wick; origin-run/doji/equal-extreme cases; parent knowledge arriving after a would-be leg; first-bar and later C3 eligibility; strict swing requiring its right neighbor; parent FVG created on the touch bar; IC formed with no observed POI; protected-swing failure retained; context withdrawal during a pending leg; HTF-boundary expiry; bounded history; and immutable event replay after adverse bars.

Then compare timestamped bars on the same symbol, timeframe, data range and settings against these exact reference versions. Record disagreements as rule differences before changing thresholds. No native side-by-side accuracy or profitability result is claimed by this source audit.
