Hi all! The question is more out of curiosity, "Why are the ENUM_TIMEFRAMES enumeration members assigned these particular values? Where did the number16385 come from when going from M30 to H1?"
Hi all! The question is more out of curiosity, "Why are the ENUM_TIMEFRAMES enumeration members assigned these particular values? Where did the number16385 come from when going from M30 to H1?"
In the script, it is understandable, you can query until it "miraculously" finds it, but it is not acceptable for the indicator.
By the way, I remembered that I had to write the function myself since the built-in function was unable to use it for the indicator
//--------------------------------------------------------------------------+//= Ищет индекс массива MqlRates по времени//= Протестировано 28,12,2011//= для прохода по 4 000 800 баров Скопировано USDJPY//= ошибок = 0 GetTickCount 2 200 мс.//= ВОЗВРАТИТ -1 в случае ошибки + сообщение Алерт//--------------------------------------------------------------------------+int save_indexs=0;
//+------------------------------------------------------------------+//| |//+------------------------------------------------------------------+int FindIndex(datetime find,MqlRates &xxxxxx[])
{
int size_mql=ArraySize(xxxxxx);
//проверим находится ли время в массиве, и есть ли где искатьif(size_mql<=0){Alert("ggg");return(-1);}
if(find>xxxxxx[0].time)return(0);
if(find<=xxxxxx[size_mql-1].time)return(size_mql-1);
//а может лежит рядом?//проверим по скорости с глоб. перем.for(int i=save_indexs+1;i>=save_indexs-1 && i>=0;i--)
if(i<size_mql)
if(find==xxxxxx[i].time)
return(i);
//результат с применением ошибок = 0 GetTickCount 843 мс.//результат без применения ошибок = 0 GetTickCount 3 744 мс.//начнемсint kolvo=size_mql,
start_save=size_mql-1,
end_save=0;
while(!IsStopped())
{
//градация поиска +1 для плавающей запятой, учесть все не ошибиться, дойдет до - минусовint grad=kolvo/StringLen(IntegerToString(kolvo))+1;
if(grad<10)grad=1;
//for(int start=start_save,karetka=start-grad; start>=end_save; start=karetka,karetka=start-grad)
{
//karetka может выходить за размер массif(karetka<0)karetka=0;
if(find>=xxxxxx[start].time && find<=xxxxxx[karetka].time)
{
kolvo=start-karetka+1;
start_save=start;
end_save=karetka;
if(start==karetka+1){save_indexs=karetka;return(karetka);}
break;//for
}
}
}
return(-1);
}
//+------------------------------------------------------------------+
two years have passed and it's still there, it's weird.
there seems to be an error in searching for the bar in time in the CopyClose function (and in others, too).
....
it's been two years and it's still there, it's strange.
it's not a bug, it's a bug (c)
CopyXXX fi take data from corresponding buffers and if there is no data in buffer (alien symbol and / or timeframe is different from current one), then there will be an error. Nevertheless in this case the buffers forming process is started and if after some (sic!) time CopyXXX is called again the result may be obtained. You can't use Sleep in indicators, that's why you have to use timer, because you can't count on the next tick (output and non-liquid instruments are to blame)
Hi all! The question is more out of curiosity, "Why are the ENUM_TIMEFRAMES enumeration members assigned these particular values? Where did the number16385 come from when going from M30 to H1?"
Thanks in advance for the answer(s)!!!
Hi all! The question is more out of curiosity, "Why are the ENUM_TIMEFRAMES enumeration members assigned these particular values? Where did the number16385 come from when going from M30 to H1?"
Thanks in advance for the answer(s)!!!
Thank you! But I've got the question wrong as I'm even more confused now... If you don't mind, a couple of more clarifying questions:
1) Why?
2) And why 14?
:)
Thank you! But I've got the question wrong, as I'm even more confused now... If you don't mind, a couple of more clarifying questions:
1) Why?
2) And why 14?
:)
I think there is an error in searching for bar by time I found it inCopyClose function (and in others too).
when copying one bar of the "alien" symbol with this function, a copying error occurs, even though this bar is present in the open window next to it.
In the script, it is understandable, you can query until it "miraculously" finds it, but it is not acceptable for the indicator.
By the way, I remembered that I had to write the function myself since the built-in function was unable to use it for the indicator
two years have passed and it's still there, it's weird.
there seems to be an error in searching for the bar in time in the CopyClose function (and in others, too).
....
it's been two years and it's still there, it's strange.
it's not a bug, it's a bug (c)
CopyXXX fi take data from corresponding buffers and if there is no data in buffer (alien symbol and / or timeframe is different from current one), then there will be an error. Nevertheless in this case the buffers forming process is started and if after some (sic!) time CopyXXX is called again the result may be obtained. You can't use Sleep in indicators, that's why you have to use timer, because you can't count on the next tick (output and non-liquid instruments are to blame)
I can't access the vault via the website, when I enter my username and password, the login and password box pops up again.
I also can't retrieve anything via MetaEditor:
Login and password are correct
Could you tell me the reason?
I can't log into the vault via the website, when I enter my username and password, the login and password box appears again.
I also can't retrieve anything via MetaEditor:
Login and password are correct
Could you tell me the reason?
Maybe you changed your password, there was a bug.