# Market facilitation index

`bw_mfi`

Price range per unit of volume, with Bill Williams' four colours.

## Inputs

| Name | Type | Default | Range |
| --- | --- | --- | --- |
| volume | volume | tick |  |

## Outputs

| Name | Kind |
| --- | --- |
| mfi | value |
| phase | value |

Warm-up: 1 bars (1 at the defaults).

Repaints: No.

## Formula

MFI = (high - low) / volume, empty where the volume is 0

phase: 0 green (MFI up, volume up), 1 fade (down, down), 2 fake (MFI up, volume down), 3 squat (MFI down, volume up). The directions start up and change only when the value strictly changes from the previous bar.
