Loading…

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 · MT5 · v1.0 · Free

About Session High Low Open Lines

Session High Low Open Lines is an indicator for MetaTrader 5. It has 7 settings, such as Session start hour, Session end hour and Sessions back. MQL source code included.

Files in the download: SessionLevels.ex5, SessionLevels.mq5, SessionLevels.txt.

Settings

SettingDefaultWhat it does
Session start hour8Session start hour (broker time, 0-23)
Session end hour16Session end hour (broker time, 0-23)
Sessions back5How many past sessions to keep drawn
Open colorclrDodgerBlueOpen line colour
High colorclrLimeGreenHigh line colour
Low colorclrCrimsonLow line colour
Show labelstrueShow O/H/L text labels

How to install

  1. Download the ZIP from your PolyMaria library and unzip it.
  2. In MetaTrader 5 open File → Open Data Folder, then go to MQL5 → Indicators.
  3. Copy the .mq5 file(s) there. Put any .mqh files in MQL5 → Include.
  4. Open the .mq5 file in MetaEditor and press Compile (F7) if MetaTrader does not show it.
  5. Drag the indicator from the Navigator onto a chart and adjust the settings.

Download the PDF guide

Tags: Breakout · Support & Resistance · Trading Sessions · MT5 Indicator · MQL5 Source Code

MetaTrader 4 & 5 indicators · PolyMaria