Ok Steve, I still don't understand, what bug you claim to have fixed, but I'll leave you alone.
Everyone, it is obviously a bad idea to post EA files all over the topic. I'll just post what I found and you can make the changes yourself.
At line 3827 replace this
Code: Select all
while ( time >= tradeHours[i] )
{
if ( i == ArraySize( tradeHours ) ) break;
i++;
}
with this
Code: Select all
while ( time >= tradeHours[i] )
{
i++;
if ( i == ArraySize( tradeHours ) ) break;
}
It sometimes caused 'Array out of range' errors. I don't know why, but Empty4 doesn't mind them very much, so you don't usually stumble upon them.
Also I doubt that anybody here has sunday candles at all, but if you do, you should go to line 3690 and replace this
Code: Select all
if (BrokerHasSundayCandle)
if (TradingTF == PERIOD_D1)
shift = 2;
with this
Code: Select all
if (BrokerHasSundayCandle)
if (TradingTF == PERIOD_D1)
if(TimeDayOfWeek(iTime(NULL,PERIOD_D1,0))==1)
shift = 2;
Cheers.