Maybe I didn't explain it correctly, but you need to find two dates to the exact hour (minutes and seconds are not important). You only have a comparison by hours.
you have to find the dates, or compare the hour of 2 dates ?
Would CopyTime work better?
This way.
intCopyTime(
string symbol_name, // имя символаENUM_TIMEFRAMES timeframe, // период PERIOD_H1datetime start_time, // с какой датыint count, // сколько копируем 1datetime time_array[] // массив для копирования времени открытия
);
Функция получает в массив time_array исторические данные времени открытия баров для указанной пары символ-период в указанном количестве. Необходимо отметить, что отсчет элементов от стартовой позиции ведется от настоящего к прошлому, то есть стартовая позиция, равная 0, означает текущий бар. При копировании заранее неизвестного количества...
Is it possible to make a table in MT4 with a structure like in Excel (+ and - collapses and unfolds the data)? If so, where can I read about it?
Hi all! I'm just learning the codes. There is an error, I can't figure out how to fix it.
int CountTrades(int type, int magic)
{
int count=0;
for(int i=OrdersTotal()-1;i>=0;i-)
{
if(OrderSelect(i,SELECT_BY_POS,MODE_TRADES))
{
if(OrderSymbol()==Symbol() && (OrderType()==type||type==-1) &&
(OrderMagicNumber()==magic||magic==-1))
count++;
}
}
return (count);
I've highlighted what it misses.
The errors are as follows:
"-" operand expected
")" - unexpected token
"i" - undeclared identifier
It's like he doesn't like that I put minus after i in the first error. Maybe I should hyphenate it somehow?
I did it all letter by letter with the tutorial - but the code does not compile.
I need your help.
Hi all! I'm just learning the codes. There's a bug, can't figure out how to fix it.
Two minuses and no brackets to close the function.
Thank you very much! All fixed! It's working!
I had to compare the two datetime by hours, I did it this way:
It worked, but maybe this is not the most correct way? What do the programmers have to say?
I had to compare the two datetime by hours, I did it this way:
It worked, but maybe this is not the most correct way? What do the programmers have to say?
Maybe I didn't explain it correctly, but you need to find two dates to the exact hour (minutes and seconds are not important). You only have a comparison by hours.
Maybe I didn't explain it correctly, but you need to find two dates to the exact hour (minutes and seconds are not important).
you need to find dates, or compare the hour of 2 dates ?
find dates, or compare the hour of 2 dates ?
You need to find dates to the exact hour (minutes and seconds are not important).
you have to find the dates, or compare the hour of 2 dates ?
Would CopyTime work better?
This way.
Translating time into a string and comparing it is not a good option.