Bwalya Tambule:
I am having the above problem.
I have coded iHigh(Symbol(),PERIOD_D1,0) in order to have todays highest price.
But instead the display on the chart of the result of code shows it is giving the highest close.
This could be an empty 4 problem
Highest close of what?
On MT4: Unless the current chart is that specific pair/TF referenced, you must handle 4066/4073 errors
before accessing prices.
Download history in MQL4 EA - MQL4 and MetaTrader 4 - MQL4 programming forum
Download history in MQL4 EA - MQL4 and MetaTrader 4 - MQL4 programming forum
Keith Watford:
close of Hour Candle.
Highest close of what?
I found a way around it. The EA is using Hr 1 trading time frame.
So I got Hr1 bar shift at days open and then highest Hr bars from then on.
Works fine
Marco vd Heijden:
You can also check out
below is code of what I did.
//
double TodaysHigh()
{
int HighBarH1 = iHighest(Symbol(), PERIOD_H1,MODE_HIGH,Day0Bar(),0);
return(iHigh(Symbol(),PERIOD_H1,HighBarH1) );
}
//
double TodaysLow()
{
int LowBarH1 = iLowest(Symbol(), PERIOD_H1,MODE_LOW,Day0Bar(),0);
}
//
double TodaysLow()
{
int LowBarH1 = iLowest(Symbol(), PERIOD_H1,MODE_LOW,Day0Bar(),0);
return(iLow(Symbol(),PERIOD_H1,LowBarH1) );
}
}

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
I am having the above problem.
I have coded iHigh(Symbol(),PERIOD_D1,0) in order to have todays highest price.
But instead the display on the chart of the result of code shows it is giving the highest close.
This could be an empty 4 problem