Skip to content
All library documents

Marking and Tracking High-Low Ranges for Trading Sessions

Article MQL5 code base

Summary

The document explains a chart indicator that records the highest and lowest prices within a user-defined session window. When the window ends, it retains that range as a historical reference; the active session continues updating with each tick. Traders can display the range as a box or as separate high and low lines, keep a chosen number of past sessions, and optionally extend the current display to the present time. The suggested uses include tracking one session’s range before a later session’s breakout or overlap, and marking a fixed event window.

The time window uses broker or server time, and windows that cross midnight are supported. The document recommends checking the broker’s time offset and accounting for daylight-saving changes in the relevant session timezone. It says lower chart timeframes can capture session boundaries more precisely, while noting that the method is time-based rather than a price signal. No trading rules, performance results, or evidence that breakouts or fades are profitable are provided; the indicator only automates range marking.

Key ideas

  • The indicator records the highest and lowest prices inside a configured time window.
  • Completed session ranges remain on the chart as historical reference levels.
  • The active session’s range updates on each tick until its window closes.
  • Session times use broker or server time, so offsets and daylight-saving changes should be checked.
  • The display can use a range box or separate high and low lines.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.