Volume indicators incorporate volume data in their calculations to provide insight into buying and selling pressure, money flow, and market participation strength.
| Type | Description |
|---|---|
| Money Flow Index (MFI) | Volume-weighted RSI that measures buying and selling pressure using both price and volume data. Overbought above 80, oversold below 20. |
| On-Balance Volume (OBV) | Cumulative volume indicator that adds volume on up bars and subtracts volume on down bars to show volume flow relative to price. |
| Function | Description |
|---|---|
mfi | Money Flow Index — volume-weighted momentum |
obv | On-Balance Volume — cumulative volume flow |
mfi - Money Flow Index
mfi(source: TimeSeries, period?: number = 14): number — Money Flow Index. Measures volume-weighted momentum and returns a value from 0 to 100.
| Parameter | Type | Description |
|---|---|---|
source | TimeSeries | Source data series with volume |
period | number | Number of periods (default: 14) |
Returns: number — MFI value from 0 to 100.
var mfiData = mfi(source=trade, period=14);obv - On-Balance Volume
obv(source: TimeSeries): number — On-Balance Volume. Shows cumulative volume flow by adding volume when price rises and subtracting volume when price falls.
| Parameter | Type | Description |
|---|---|---|
source | TimeSeries | Source data series with volume |
Returns: number — OBV value.
var obvData = obv(source=trade);Best Practices
Volume Quality
High volume during breakouts confirms the move. Low-volume breakouts are often false signals that reverse quickly.
Divergence Analysis
Watch for divergences between price and volume indicators. When price makes new highs but volume indicators do not, be cautious.