iHigh(Symbol(),PERIOD_D1,0) is giving me Highest close
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?
Download history in MQL4 EA - MQL4 and MetaTrader 4 - MQL4 programming forum
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
You can also check out
below is code of what I did.
//
double TodaysHigh()
{
int HighBarH1 = iHighest(Symbol(), PERIOD_H1,MODE_HIGH,Day0Bar(),0);
}
//
double TodaysLow()
{
int LowBarH1 = iLowest(Symbol(), PERIOD_H1,MODE_LOW,Day0Bar(),0);
}
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