# Money Flow Index — MFI

Use the [shared role, Reverse and timing rules](../05-signal-passports.md). MFI relates positive and negative money flow based on typical price `(H+Lo+C)/3` and base trading volume. It is not RSI applied only to close. The period p counts bars; up/low set the MFI channel.

Defaults are p=14, up=80, low=20. p is integer 2…30; thresholds are integers 5…95 with up>low. Flat price or zero-flow cases are not resolved by inventing a crossing from the usual formula.

## Entry — mfi.entry

Let F be the MFI value:

- `CEC`: F1>low and F0<=low gives L; otherwise F1<up and F0>=up gives S; otherwise N. This leaves the inner channel.
- `CRTC`: F1<low and F0>=low gives L; otherwise F1>up and F0<=up gives S; otherwise N. This returns from an extreme region.

Current equality is included; previous equality does not start a crossing. Use these exact codes rather than reversing the events from an informal channel description.

## Channel filter — mfi.filter

F0>=up gives IL; otherwise F0<=low gives IS. In the remaining inner region, `BD` gives AA and `BHL` gives N. This is a state rule with inclusive extreme thresholds, not a channel crossing.

## Growth/decline filter — mfi-growth-decline.filter

This is the separate `MFI_PRICE_LIMIT_BY_GROWTH_DECLINE` ID. It has p, without up/low/ec. F0>F1 gives IS; F0<F1 gives IL; equality gives AA; otherwise N.

## Exit — mfi.exit

Use the chosen CEC/CRTC predicate with the shared cba rules. ED/EDOP uses the opposite directional result after Reverse; AVG uses the position's own direction. Neither MFI filter is an equivalent replacement.

## Definition coverage and observed controls

The controls below identify this dated schema. Their exact labels, value types and context overrides are in the catalogue. Any omitted standard selector must not be added manually.

- `mfi.entry` — `MAIN` / `MFI`. Semantics: **Entry — mfi.entry**. Fields: `ss`, `Is`, `ct`, `at`, `rs`, `p`, `up`, `low`, `ec`. timeframe: ID-specific list; default 1m; candles: DEFAULT/HEIKEN_ASHI; default DEFAULT; calculation: CL/CR; default CL; Reverse: available; default false.
- `mfi.exit` — `CLOSE_BY` / `MFI`. Semantics: **Exit — mfi.exit**. Fields: `ss`, `Is`, `ct`, `at`, `rs`, `cba`, `p`, `up`, `low`, `ec`. timeframe: ID-specific list; default 1m; candles: DEFAULT/HEIKEN_ASHI; default DEFAULT; calculation: CL/CR; default CL; Reverse: available; default false.
- `mfi-growth-decline.filter` — `PRICE_LIMIT` / `MFI_PRICE_LIMIT_BY_GROWTH_DECLINE`. Semantics: **Growth/decline filter — mfi-growth-decline.filter**. Fields: `ss`, `Is`, `ct`, `at`, `rs`, `pla`, `p`. timeframe: ID-specific list; default 1m; candles: DEFAULT/HEIKEN_ASHI; default DEFAULT; calculation: CL/CR; default CR; Reverse: available; default false.
- `mfi.filter` — `PRICE_LIMIT` / `MFI_PRICE_LIMIT`. Semantics: **Channel filter — mfi.filter**. Fields: `ss`, `Is`, `ct`, `at`, `rs`, `pla`, `p`, `up`, `low`, `ft`. timeframe: ID-specific list; default 1m; candles: DEFAULT/HEIKEN_ASHI; default DEFAULT; calculation: CL/CR; default CR; Reverse: available; default false.
