Session High Low Open Lines
A session's open, high and low are levels many intraday traders watch as support, resistance or a breakout reference, but drawing them by hand means updating three lines by eye every session. This indicator draws all three automatically for one configurable session window - a plain start/end hour on the terminal's own server clock, the same clock every bar's timestamp already carries, so there is no timezone table involved. Each session is treated as its own instance: the open is fixed the moment the session's first bar appears, while the high and low keep extending to include every new bar for as long as that session is still active. Once the session's end hour passes, its three lines stop moving and remain on the chart as a fixed record. A session that wraps past midnight (end hour earlier than start hour) is anchored to the calendar day it started on, not the day it ends on, matching the same convention SessionHighlighter in this set uses. Only a configurable number of the most recent sessions are kept on the chart, so this does not accumulate objects without bound on a chart left open for months. Notes and limitations - Session hours are broker server time, exactly as time[] already reports it - not the trader's local time and not a named timezone such as GMT or EST. - Only one session window is drawn per instance of the indicator; add a second copy of the indicator to the chart with different hours to track more than one session's levels at once. - The open, high and low reflect bars on the chart's current timeframe - the same session viewed on a coarser timeframe can produce a slightly different high or low if the session boundary falls in the middle of a bar on that timeframe. - Only InpSessionsBack most recent sessions are drawn; older ones are removed from the chart by design. - Purely a visual overlay built from closed and forming bar data, with nothing kept that a later bar can override, so there is nothing here that can repaint.
Indicator · MT4 · v1.0 · Free
About Session High Low Open Lines
Session High Low Open Lines is an indicator for MetaTrader 4. It has 7 settings, such as Session start hour, Session end hour and Sessions back. MQL source code included.
Files in the download: SessionLevels.ex4, SessionLevels.mq4, SessionLevels.txt.
Settings
| Setting | Default | What it does |
|---|---|---|
| Session start hour | 8 | Session start hour (broker time, 0-23) |
| Session end hour | 16 | Session end hour (broker time, 0-23) |
| Sessions back | 5 | How many past sessions to keep drawn |
| Open color | clrDodgerBlue | Open line colour |
| High color | clrLimeGreen | High line colour |
| Low color | clrCrimson | Low line colour |
| Show labels | true | Show O/H/L text labels |
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: Breakout · Support & Resistance · Trading Sessions · MT4 Indicator · MQL4 Source Code