Cumulative Delta Candles
Cumulative delta tracks the running total of estimated buy volume minus sell volume through a session, and is normally shown as a single line. This indicator instead renders it as candles: each bar's own open is the running total before that bar, its close is the running total after, giving the same "up bar / down bar" reading traders already know how to scan quickly. Per-bar delta is estimated from the bar's own OHLC and tick volume using the close-location value: a bar that closes near its high is treated as more buying than selling, near its low the reverse, split proportionally across the bar's tick volume. This is the same honest proxy used elsewhere in this catalogue wherever real traded volume is unavailable - MT4 forex/CFD feeds carry tick counts, not executed lots, and the indicator says so on its own chart label. The naive version of this idea plots a line. Rendering candles needed a real workaround: this MetaEditor build's MQL4 compiler does not support DRAW_CANDLES, so each candle is hand-drawn as an OBJ_TREND wick plus an OBJ_RECTANGLE body, anchored into the subwindow via WindowFind() - the same technique SyntheticCrossBuilder.mq4 uses elsewhere in this catalogue. A cumulative-delta candle's own high and low are not recoverable from bar data (only the running total before and after the bar is provable), so they are drawn as the max/min of open and close - a straight-line path assumption, stated plainly here and on the chart. The running total resets at the configured session start hour, so each new session begins its candle sequence back at zero rather than carrying the previous day's bias forward indefinitely. Notes and limitations - Every delta figure is an estimate from OHLC and tick volume, not a measurement of real buy/sell orders - MT4 has no such feed on most forex/CFD symbols. Treat the direction and shape as a proxy for order-flow bias, not a literal count. - A cumulative-delta candle's high/low is the straight-line max/min of its own open and close, since the true intrabar path of the running total cannot be recovered from bar data. - Only InpBarsToDraw bars are drawn as objects; scrolling far back past that window shows no candles, though the running total behind them is still computed correctly for the visible range. - No trade or alert logic - visual analysis only.
Indicator · MT5 · v1.0 · Free
About Cumulative Delta Candles
Cumulative Delta Candles is an indicator for MetaTrader 5. It has 4 settings, such as Bars to draw, Session start hour and Up color. MQL source code included.
Files in the download: CumulativeDeltaCandles.ex5, CumulativeDeltaCandles.mq5, CumulativeDeltaCandles.txt.
Settings
| Setting | Default | What it does |
|---|---|---|
| Bars to draw | 150 | How many recent bars are rendered as candle objects |
| Session start hour | 0 | Server hour (0-23) a new session/reset begins at |
| Up color | clrForestGreen | Body colour when delta rises this bar |
| Down color | clrCrimson | Body colour when delta falls this bar |
How to install
- Download the ZIP from your PolyMaria library and unzip it.
- In MetaTrader 5 open File → Open Data Folder, then go to MQL5 → Indicators.
- Copy the .mq5 file(s) there. Put any .mqh files in MQL5 → Include.
- Open the .mq5 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 · Trading Sessions · MT5 Indicator · MQL5 Source Code