![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
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
Take your time, you'll find your way ;-)
:)
Hello!
I have a problem (as usually). :)
How can I get Low and High for Sunday?
I try like this on H4 chart:
if ( (DayOfWeek()==1) && (Hour()==0) ) // is it Monday?
{
TopRange=High[iHighest(NULL,0,MODE_HIGH,1,1)]; // one bar back form monday 0:00
LowRange=Low[iLowest(NULL,0,MODE_LOW,1,1)];
}
I use H4 chart and from sunday 20:00 to monday 0:00 is only one bar.
Hello!
I have a problem (as usually). :)
How can I get Low and High for Sunday?
I try like this on H4 chart:
if ( (DayOfWeek()==1) && (Hour()==0) ) // is it Monday?
{
TopRange=High[iHighest(NULL,0,MODE_HIGH,1,1)]; // one bar back form monday 0:00
LowRange=Low[iLowest(NULL,0,MODE_LOW,1,1)];
}
I use H4 chart and from sunday 20:00 to monday 0:00 is only one bar.
This should work, but it doesn't. Anyone?
Maybe you try to get the High and low value of a daily chart trough the iHigh ang iLow function:
By the way...if you have a code, try to use the "SRC"-Button in the top of the "Add your comment" Box...makes it better to look at ;)
EP
Was too late....:D
Thanks anyway! ;)
By the way...if you have a code, try to use the "SRC"-Button in the top of the "Add your comment" Box...makes it better to look at ;)
EP
Like this?