Finding the Highest Price Within a Specified Trading-Time Window
Summary
This document explains a MetaTrader 5 function for retrieving the highest price recorded for a symbol during a chosen daily time interval. The function accepts start and end hours and minutes, uses the current date to construct the interval’s timestamps, copies the relevant high-price series, and returns the location of its maximum value. It is presented as a building block for an expert advisor that could use a session high in entry or exit logic.
The description gives the calculation steps but no trading rules, tested strategy, or performance evidence. Its practical use depends on the platform returning the intended bars for the constructed interval and on handling cases such as an empty data range or an interval that crosses midnight. Those implementation details are not discussed, so the text explains a data retrieval technique rather than demonstrating a complete or validated trading method.
Key ideas
- The described function takes start and end times and constructs a time interval on the current date.
- It retrieves bar high prices for the selected symbol within that interval and returns the maximum.
- A session high can be used as an input to entry or exit rules in an expert advisor.
- The document provides no strategy evaluation and does not discuss empty ranges or intervals crossing midnight.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.