Skip to content

MFI Advanced — port CCI Advanced view onto a Money Flow Index core #42

Description

@casoon

Port the "trend context + stall + conviction + divergence + long/short coloring" view from CCI Advanced (indicators/momentum/cci_advanced/cci_advanced.pine, v1.2.0) onto an MFI core. New indicator, not a mode of CCI Advanced.

Do after #41 (Stoch RSI) — reuse the exact framework structure established there.

Why separate

Same reasoning as #41 (static Pine input defaults, bounded vs zero-centered). Extra reason for MFI: it requires volume, so it must stay isolated — folding it into the CCI/StochRSI indicators would create a dead mode on no-volume instruments (forex, some indices).

Keep identical framework structure

Same section order as CCI Advanced: Core → Mid/Levels → Stall → Trend Context → Conviction → Divergence → Plots → Alerts.

Portable as-is

  • Trend context line = slow MFI (longer length), faint behind the fast line, long/short colored
  • Stall/absorption = oscillator-slope vs ATR-normalized price-slope (threshold rescaled to 0–100, ~15)
  • Cross conviction = MFI/signal cross contradicted by flat price or counter-trend → weak/faded triangle
  • Trend↔CCI divergence wedge = fill between fast and trend-context line that lights up only when they move opposite (supported dip vs unsupported bounce); n-bar slope + min-slope noise guard. Rescale min-slope to the 0–100 range (~10 instead of 25)
  • Long/Short coloring = green/red on trend context line + histogram + divergence wedge, teal/pink reserved for level

Adaptations vs CCI

  • MFI is single-line → signal = smoothed MFI (same kernel) as the cross partner, like CCI's signal
  • Bounded 0–100: drop the three scale modes
  • Midline 50 (not 0); "zero cross" → 50-cross
  • OB/OS defaults 80 / 20
  • Gradient keyed on 20/80
  • Shadow fill to 50
  • Long = above 50, Short = below 50
  • Volume guard: handle symbols without volume gracefully (e.g. note in README; no crash)

Deliverables

  • indicators/money_flow/mfi_advanced/mfi_advanced.pine (category: money_flow)
  • README.md, CHANGELOG.md (v1.0)
  • Header per CLAUDE.md ([WavesUnchained], ✓ features, Build date)
  • Root README.md + CATALOG.md entries
  • Validate in TradingView for CE errors

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions