Session Baton Tracker
A day's net move is easy to see on any chart; which session actually produced it is not, unless a trader manually checks the open and close price around each session boundary. This indicator draws the day's cumulative move (each bar's close minus that day's own opening price) as one continuous line, but in three colours - one per session - that switch exactly at each session handoff, using the split-buffer technique MQL4 needs for a colour-changing line (MQL4 has no DRAW_COLOR_LINE). The result reads as a relay: the line's colour literally shows which session is "carrying the baton" of the day's move at each point in time. At the end of each day (or for the still-forming current day, updated live) a label reports whichever session produced the largest net move that day - its own close-of-session value minus its own open-of-session value, compared across all three sessions by absolute size. On an hour where two sessions overlap (commonly London and New York), the later session in the handoff order is credited with that stretch of the move; this catalogue's judgment call is that overlap flow reads as dominated by the newer session's participants arriving, not the earlier session still finishing up, though a trader who reads it the other way can simply take the label as one interpretation, not a rule. Because the per-day baton assessment only makes sense once a day's bars are walked in order, this indicator recomputes the last InpDaysBack calendar days in full on every update rather than tracking incremental state across ticks - simpler to reason about and, with a modest InpDaysBack, cheap enough to run every tick without a noticeable delay. Notes and limitations - The three plotted legs share one continuous value (cumulative move since the day's own open) and are coloured, not offset - reading them as one line that changes colour, not three independent lines, is the intended view. - Only the most recent InpDaysBack calendar days are ever computed or drawn; older history shows nothing, by design, to bound both object count and per-tick cost. - The overlap-handling rule (later session wins) is a stated judgment call, not a market fact - a bar inside both London and New York hours is always credited to New York here. - The baton label for the still-forming current day updates live and can change session as the day progresses; only a fully completed day's label is final. - A day with no bars falling inside any configured session (all three disabled, or session hours that do not cover the chart's active hours) produces no baton label for that day, since there is nothing to compare. - Purely a visual/analytical overlay - no alerts or trade signals, and no repainting of an already-finalised day's line or label.
Indicator · MT4 · v1.0 · Free
About Session Baton Tracker
Session Baton Tracker is an indicator for MetaTrader 4. It has 10 settings, such as Asian start hour, Asian end hour and London start hour. MQL source code included.
Files in the download: SessionBatonTracker.mq4, SessionBatonTracker.txt.
Settings
| Setting | Default | What it does |
|---|---|---|
| Asian start hour | 0 | Asian session start hour (broker/server time, 0-23) |
| Asian end hour | 8 | Asian session end hour |
| London start hour | 8 | London session start hour |
| London end hour | 16 | London session end hour |
| New york start hour | 13 | New York session start hour |
| New york end hour | 21 | New York session end hour |
| Days back | 15 | Calendar days recomputed/labelled each update |
| Show baton label | true | Draw the dominant-session label at the end of each completed day |
| Label color | clrWhite | Baton label text colour |
| Label font size | 8 | Baton label font size |
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: Trading Sessions · MT4 Indicator · MQL4 Source Code