This is a relatively simple EA / Indicator request for MetaTrader.
We have an EA that uses the following variables:
TickPeriodHigh = iHigh(NULL, 0, 0);
TickPeriodLow = iLow(NULL, 0, 0);
These periods yield consistent results between brokers except for the Daily and 4 hour bars. In those periods, there are differences in the net calculation based on where the broker is located. For example, a GMT based broker starts its day at a different time than a US Eastern Timezone based broker.
This project is to create a GMT normalized version of the iHigh and iLow functions. The output of these functions will be functionally identical to the iHigh / iLow normal MetaTrader functions on every chart except daily and 4 hour. On a daily and 4 hour chart, the function will need to adapt it’s answer to determine what period consisted of the given 4-hour or daily chart (given the offset parameter) and determine the correct high / low.
Attached are two bits of code that may assist. One is the code to figure out what the GMT time is on a given PC. The second is code to figure out the high / low for a given period.