Chaikin Money Flow
Chaikin Money Flow starts from a Money Flow Multiplier for each bar - ((Close-Low)-(High-Close)) divided by (High-Low) - which runs from +1 when the close sits at the top of the bar's range to -1 when it sits at the bottom. The multiplier alone is a per-bar read; the indicator's actual value is that multiplier weighted by the bar's volume and summed over the lookback period, then divided by the summed volume over the same period. That division is what makes it a volume-weighted average of the multiplier rather than a plain average of it - a bar with three times the volume of its neighbours gets three times the say in the result, which is the entire reason to bring volume into a price-range measure at all. Because forex has no consolidated tape, there is no true traded volume figure available to a client terminal on either platform. This uses tick_volume - the number of price updates in the bar - as the volume input, which is a reasonable proxy for how much trading activity a bar saw but is not a count of contracts or lots. On symbols where tick activity does not track real volume well, treat the result as directional rather than exact. Notes and limitations - Needs InpPeriod bars of history before the first value appears; earlier bars are intentionally left empty rather than guessed. - Uses tick_volume as the volume input, since neither MT4 nor MT5 has a consolidated forex tape - a proxy for activity, not a literal traded volume count. Treat this as an approximation on any symbol, and be aware it is most reliable on symbols with steady, comparable tick activity across bars. - A bar with High equal to Low (a true doji with zero range) contributes a multiplier of zero rather than dividing by zero - documented explicitly because it is the one edge case in the formula that needs a defined answer. - Summed fresh over the window at every bar rather than tracked incrementally, so a changed InpPeriod or a data gap can never leave a stale partial sum behind, and nothing here can repaint once a bar closes.
Indicator · MT4 · v1.0 · Free
About Chaikin Money Flow
Chaikin Money Flow is an indicator for MetaTrader 4. It can alert you with a pop-up, sound, email or push message. It has 2 settings, such as Period and Alerts. MQL source code included.
Files in the download: ChaikinMoneyFlow.ex4, ChaikinMoneyFlow.mq4, ChaikinMoneyFlow.txt.
Settings
| Setting | Default | What it does |
|---|---|---|
| Period | 20 | Summation period, in bars |
| Alerts | true | Alert once per closed bar on a zero-line cross |
How to install
- Download the ZIP from your PolyMaria library and unzip it.
- In MetaTrader 4 open File → Open Data Folder, then go to MQL4 → Indicators.
- Copy the .mq4 file(s) there. Put any .mqh files in MQL4 → Include.
- Open the .mq4 file in MetaEditor and press Compile (F7) if MetaTrader does not show it.
- Drag the indicator from the Navigator onto a chart and adjust the settings.
Tags: Volume · Oscillator · Alerts · MT4 Indicator · MQL4 Source Code