# Phase F6 — All TradingBite indicators

**Base:** `v0.10.0` @ `6108fd4`  
**Target tag:** `v0.11.0` (when full acceptance passes — **not tagged yet**)  
**Status:** **Audit finalized** (`5f1117b`) — **framework extensions in progress** — indicator ports **NOT STARTED**

## Objective

Migrate **all approved** TradingBite Pine indicators (see finalized inventory) into the **single** existing `IndicatorDefinition` registry and expose them via **Trading Products → New Indicators**.

## Audit decisions (finalized 2026-10-04)

| Item | Decision |
| ---- | -------- |
| Structural Market Swings v1.2 | **INCLUDED** in catalog — APPROVED — NEEDS PORT |
| Insight Lab v1.1 | **INCLUDED** — APPROVED — EXPERIMENTAL / NEEDS REVIEW (not production-stable) |
| Watermark v3 | **EXCLUDED** from New Indicators — UI watermark/chrome only |

Inventory authority: [TRADINGBITE-INDICATOR-INVENTORY.md](../indicators/TRADINGBITE-INDICATOR-INVENTORY.md)

## Indicator catalog (F6 scope)

All **eight** approved TradingBite indicators in the inventory:

1. Support and Resistance Finder 2.1 (already migrated)  
2. BOS V2.2  
3. Wyckoff Market Structure v2.1  
4. Pullback Meter  
5. High/Low Sweep (Sweep Confirm)  
6. Command Center  
7. Structural Market Swings v1.2  
8. Insight Lab v1.1 (experimental)

Watermark v3 is **out of scope** for New Indicators.

## Required platform capabilities (before / during migration)

Reuse the **one** registry (`registerIndicator`, `runIndicator`, `IndicatorDefinition`). Extend only as needed:

| Capability | Purpose |
| ---------- | ------- |
| Overlay line outputs | Existing path (`overlay-render.ts`); keep for compatible studies |
| Pane / oscillator outputs | Non-price-scaled indicators on synchronized panes (F5 pane foundation) |
| Markers | BOS, swings, sweep events |
| Labels | Wyckoff, sweep, structure annotations |
| Boxes / zones | Wyckoff phases, S/R zones in Pine |
| Other visual output types | As required by source — extend renderer minimally |
| Stable `indicatorInstanceId` | Multiple instances + future F7 alerts |
| Multiple simultaneous instances | e.g. SMA 20/50/200 pattern for TB products |
| Per-instance settings | Parameters per instance, not global toggles only |
| Historical calculation | Full bar series, lookback, `na` semantics |
| Live / forming-bar calculation | F5 path; indicator-specific forming rules |
| Completed-bar recalculation | Finalize on bar close without full-history recompute where safe |
| MTF candle / input architecture | `request.security` equivalents — no silent chart-TF substitution |
| Indicator condition / event metadata | F7 alert compatibility (`IndicatorAlertReference`, events) |
| F7 alert compatibility | Off-chart evaluation; no second alert system |
| Chart appearance customization | User candle/volume colors, dark/light chart theme, persisted with layouts — [F6-FRAMEWORK.md](../indicators/F6-FRAMEWORK.md) |

Implementation notes: [F6-FRAMEWORK.md](../indicators/F6-FRAMEWORK.md)

## Source fidelity rule

**Do not** create simplified or fake versions of TradingBite indicators to fit the current line-only renderer.

Preserve approved Pine behavior as closely as technically possible. If a Pine feature cannot be supported yet, **document the limitation** and add proper architecture — do not pretend parity.

## Known hard cases (must remain in F6 docs / ADRs as needed)

- **BOS V2.2:** `DevLucem/ZigLib/1` — parity strategy before port; no guessed zig logic.  
- **Wyckoff v2.1:** lines, boxes, labels, phases — renderer insufficient today; no flattening.  
- **Command Center:** heavy MTF — requires MTF inputs.  
- **S/R Finder 2.1:** migrated; `useMtf` still blocked without MTF plumbing.  
- **Structural Market Swings:** approved, needs port.  
- **Insight Lab:** approved experimental; not production-ready labeling.

## Non-goals (F6 still excludes)

- F7 alert engine, notifications, background workers  
- F8 backtest / F9 watchlists  
- Deployment  
- TradingView scraping or private APIs  
- Second indicator framework  

## Out of scope for audit checkpoint (this commit)

No implementation in the audit-finalization step:

- BOS, Wyckoff, Pullback, Sweep, Command Center, Structural Swings, Insight Lab ports  
- Trading Products UI / New Indicators page  
- Indicator manager, alert engine, notifications  

## Acceptance (future — for `v0.11.0`)

- Every catalog indicator: **MIGRATED** or documented **BLOCKED** with reason  
- New Indicators UI: add, configure, enable/disable, remove  
- Tests per indicator + SMA/S/R regression + F5 smoke  
- S/R Finder remains regression baseline for first TB port  

## Rollback

`git checkout v0.10.0`

## Next phase (after this checkpoint)

**F6 framework extensions + first proper TradingBite indicator migration** — not started in audit finalization.
