I think that your 2nd code returns the high of the last 23 hourly candles (including the current incomplete candle.
Your first code returns the high of the current incomplete daily candle.
I think that you need to be more specific. What do you mean by day high? Yesterday's high? Today's high? High of a 24 hour period that does not coincide with your new broker's day?
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Due to the different server time of my new broker I need to change the formula I utilise to find the day high:
double NewHigh=iHigh(NULL,PERIOD_D1,0);
Going through the manual and the forum the most appropriate solution I thought of was:
double NewHigh=High[iHighest(NULL,PERIOD_H1,MODE_HIGH,23,0)];
However, checking the results on my old broker using the Print function (and setting 23.59 as the time when I want to find the day high), the two expressions give always different results. In particular, the second one usually gives back the closing price of candle 0. Changing to PERIOD_H4,6,0 the result is no different.
Any help would be much appreciated.