Session Cumulative Delta
Cumulative delta only means something measured from a defined start point, so this indicator sums per-bar classified volume from the chosen session start hour and resets that sum the moment the next session begins - the line always answers "what has net buying pressure been so far this session", never a total that quietly drifts across session boundaries. MQL4 keeps no per-tick trade record in its history, only OHLC and tick volume per bar. Rather than pretend otherwise, each bar's whole tick volume is classified by its own close versus its own open: an up-close bar counts as buy volume, a down-close bar as sell volume, a flat bar counts as neither. That is a bar-level proxy for delta, not a genuine tick-by-tick one, and it is the honest limit of what MQL4 history can support. On top of the running total, the indicator tracks the running session high and the delta value recorded the last time that high advanced. Whenever price prints a fresh session high but the cumulative delta fails to also exceed its own prior peak, a marker appears on the delta line - buying pressure fading even as price grinds higher, a classic early warning that is easy to miss reading price alone. Doing the session reset correctly on every tick without rescanning the whole chart is the part that is easy to get wrong. Each call carries forward the sums for whatever part of the current session was already computed on the previous tick by walking back only as far as that session's own start, then replays that segment in chronological order so the delta value attached to the session high is genuinely the value at that moment, not a blind sum over the segment. Notes and limitations - Built on a whole-bar classification of tick volume, not a real per-tick buy/sell record - MQL4 does not retain one in history. See the description above for why that is the honest limit here. - The "no confirmation" marker is a divergence-style warning, not a trade signal on its own. Price can and does keep extending after it fires, sometimes for a long time. - Best suited to intraday timeframes with a session that fits inside the chart's own day. On D1 and above a "session" collapses to the whole bar and the tool loses its purpose. - Uses tick volume, which is a liquidity proxy on most retail feeds, not real traded size.
Indicator · MT5 · v1.0 · Free
About Session Cumulative Delta
Session Cumulative Delta is an indicator for MetaTrader 5. It draws buy and sell arrows on the chart and can alert you with a pop-up, sound, email or push message. It has 2 settings, such as Session start hour and Alerts. MQL source code included.
Files in the download: SessionCumulativeDelta.ex5, SessionCumulativeDelta.mq5, SessionCumulativeDelta.txt.
Settings
| Setting | Default | What it does |
|---|---|---|
| Session start hour | 0 | Server hour the session resets at (0-23) |
| Alerts | true | Alert when a new session high forms without delta confirming |
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 · Buy/Sell Arrows · Alerts · MT5 Indicator · MQL5 Source Code