MoneyFlow
MoneyFlow in ProBuilder measures buying and selling pressure from price and volume, normalised between -1 and 1. Syntax, formula, examples, interpretation.
Syntax
MoneyFlow[N](price)Parameters
| Name | Type | Default | Description |
|---|---|---|---|
N | integer | none | Number of bars over which buying and selling pressure is aggregated. Larger values produce a slower, smoother reading. |
price | price source | close | The price series used in the calculation, typically close. Also accepts open, high, low or a custom variable. |
Formula
The exact internal formula is not published. The output aggregates the direction of price changes weighted by volume over the last N bars, then normalises the result to the fixed range:
-1 <= MoneyFlow[N](price) <= 1The bounded scale makes readings directly comparable across instruments and timeframes, unlike cumulative volume measures such as OBV.
How it works
On each bar, the indicator evaluates whether volume is associated with rising or falling prices inside the N bar window. Bars where volume accompanies price gains push the value toward +1, bars where volume accompanies price declines push it toward -1. A reading near zero means buying and selling pressure roughly cancel out.
Because the output is normalised, it behaves like an oscillator rather than a running total. It does not drift with the length of the loaded history, and its extremes have consistent meaning: values close to +1 or -1 mark one-sided flows that rarely persist for long.
The raw line can be jumpy on short settings. Applying a smoothing pass, such as a moving average or a linear regression, is a common way to extract the underlying trend of the flow.
Examples
Example 1, Trend of money flow via linear regression (Indicator)
// Long-window money flow, then a regression to read its slope
mf = MoneyFlow[100](close)
LRmf = linearregression[20](mf)
IF(LRmf > 0) THEN
bullishmarket = 1
ELSE
bullishmarket = 0
ENDIF
RETURN bullishmarketComputes money flow over 100 bars, fits a 20-bar linear regression to it, and returns 1 while the regression is positive. The output is a binary bullish-pressure flag.
Example 2, Strong inflow screener (ProScreener)
// Instruments with clearly positive money flow
mf = MoneyFlow[50](close)
SCREENER[mf > 0.5](mf AS "Money Flow")Lists instruments whose 50-bar money flow exceeds 0.5, the upper half of the positive range, indicating sustained volume-backed buying.
Example 3, Flow-confirmed breakout entry (ProOrder)
// Only buy breakouts that volume flow agrees with
mf = MoneyFlow[50](close)
breakout = close CROSSES OVER highest[20](high)[1]
IF NOT OnMarket AND breakout AND mf > 0 THEN
BUY 1 CONTRACT AT MARKET
ENDIF
IF LongOnMarket AND mf < 0 THEN
SELL AT MARKET
ENDIFUses money flow as a confirmation filter. Breakouts are only bought while net flow is positive, and the position is closed when flow turns negative.
Interpretation
| Reading | Meaning |
|---|---|
| Near +1 | Strongly one-sided buying pressure over the window. |
| Above 0 | Net buying pressure, volume favours rising prices. |
| Near 0 | Balanced flows, no dominant side. |
| Below 0 | Net selling pressure, volume favours falling prices. |
| Near -1 | Strongly one-sided selling pressure. |
Zero-line crossings mark shifts in the dominant side of the market. Divergences between price and money flow, for example new price highs while the flow declines, are commonly read as weakening participation behind the move.
Common errors and gotchas
- Volume data is required. On instruments without reliable volume, such as many cash forex feeds, the output is meaningless even though the code compiles and runs.
- Not the same as MoneyFlowIndex.
MoneyFlowis bounded between -1 and 1, whileMoneyFlowIndexis a 0 to 100 oscillator with a published RSI-style formula. Thresholds from one do not apply to the other. - Short windows are noisy. Small
Nvalues flip sign frequently. Smooth the output or lengthen the window before using zero crossings as signals. - Unpublished formula. The internal calculation is not documented, so the exact values cannot be reproduced by hand. Treat the indicator as a black-box pressure gauge rather than an auditable statistic.
Related instructions
MoneyFlowIndex, the volume-weighted RSI variant on a 0 to 100 scale.OBV, cumulative volume total signed by price direction.AccumDistr, accumulation and distribution line built from close location.ChaikinOsc, oscillator of the accumulation and distribution line.ForceIndex, price change multiplied by volume.Volume, the raw per-bar volume constant.LinearRegression, used above to read the slope of the flow.PVT, price and volume trend, a cumulative percentage-weighted flow.
