voidOnStart()
{
MqlTick ExTicks[];
datetime tm=StringToTime("1971.01.01 00:00:00");
//--- вывод результатаulong m=tm*1000;
int copied=CopyTicks(_Symbol,ExTicks,COPY_TICKS_ALL,m);
Print("Получено тиков: ",copied," код ошибки: ",GetLastError());
}
all the time gets 2,000 ticks. The help says if no time is specified, no more than 2000 ticks are transmitted. Time is specified in milliseconds and seconds are multiplied by 1000.
Also, help specifies that these are ticks for the current session. So, it turns out that historical data cannot be accessed?
all the time gets 2,000 ticks. The help says that if no time is specified, no more than 2000 ticks are transmitted. Time is specified in milliseconds and seconds are multiplied by 1000.
Also, help specifies that these are ticks for the current session. So, it turns out that you cannot access historical data?
Do you want to get all ticks? :)
First, check if your computer can handle so many ticks (if your computer burns out, it's not my fault):
//+------------------------------------------------------------------+//| CopyTicks_1_02.mq5|//| Copyright 2015, MetaQuotes Software Corp. |//| https://www.mql5.com |//+------------------------------------------------------------------+#property copyright"Copyright 2015, MetaQuotes Software Corp."#property link"https://www.mql5.com"#property version"1.031"//--- покажем окно входных параметров при запуске скрипта#property script_show_inputsinputint ticks=200000000000; // количество запрашиваемых тиковinputdatetime start=D'1971.01.01 23:59'; // с какой даты запрашивать тики//---MqlTick ExTicks[];
//+------------------------------------------------------------------+//| Script program start function |//+------------------------------------------------------------------+voidOnStart()
{
//--- запросим тикиint copied=CopyTicks(_Symbol,ExTicks,COPY_TICKS_ALL,(ulong)start*1000,ticks);
//--- если тики получены, то выведем на график значения Bid и Ask Print("Получено тиков: ",copied," код ошибки: ",GetLastError());
if(copied>1)
{
Print("Тик: ",ExTicks[0].time," bid: ",ExTicks[0].bid," ask: ",ExTicks[0].ask," last: ",ExTicks[0].last," [0]");
Print("Тик: ",ExTicks[copied-1].time," bid: ",ExTicks[copied-1].bid," ask: ",ExTicks[copied-1].ask," last: ",ExTicks[copied-1].last," [",copied-1,"]");
//datetime Start =D'2015.10.16 23:59'; // время наступления 2015 года//datetime End =D'2015.10.19 00:02'; // время наступления 2015 года//for(int i=0;i<copied-1;i++)// if(ExTicks[i].time>Start && ExTicks[i].time<End)// Print("Тик: ",ExTicks[i].time," bid: ",ExTicks[i].bid," ask: ",ExTicks[i].ask," last: ",ExTicks[i].last," [i]");
}
Print("Size ",((long)copied*sizeof(MqlTick))>>20," Mb");
}
//+------------------------------------------------------------------+
Yes I need to know from which date there is data (i.e. from which date the test can be run on real ticks).
And how much is not a problem for the computer to query? You must be exaggerating, it's more likely to freeze?
Instead of "20000000000000" put "20000" and a date, any date in 1971. That said, it's very likely that you'll need to run the script more than once. The thing is that the first request will initialize all of the downloaded history (because you ordered the history since 1971), and if the script does not respond for a long time, it will give the data that are available, but the download will go further. Therefore, the second request can show a deeper history.
all the time gets 2,000 ticks. The help says if no time is specified, no more than 2000 ticks are transmitted. Time is specified in milliseconds and seconds are multiplied by 1000.
Also, help specifies that these are ticks for the current session. So, it turns out that you cannot access historical data?
You can not get all ticks for the symbol, if they are more than INT_MAX, because the return value
of CopyTicks function is integer. Therefore, you need to get them in parts.
You cannot get all the ticks per character if they are greater than INT_MAX, because the return value
of the CopyTicks function is integer. Therefore you have to get them in parts.
Nevertheless, the initial date of ticks can be found out by requesting only 20000 (twenty thousand) ticks - the main thing is to specify the initial date, which guarantees, that on this date there were no ticks yet and 1971 is the best fit for it.
Karputov Vladimir: Nevertheless, it is possible to find out the starting date of ticks by requesting only 20000 (twenty thousand) ticks - the main thing is to specify the starting date, which guarantees that on this date there were no ticks yet, and 1971 is the best way to do it.
Requested a lot of data, really strong braking has started:
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
Is there a software way to determine the depth of the ticking history?
Tried this:
all the time gets 2,000 ticks. The help says if no time is specified, no more than 2000 ticks are transmitted. Time is specified in milliseconds and seconds are multiplied by 1000.
Also, help specifies that these are ticks for the current session. So, it turns out that historical data cannot be accessed?
Is there a software way to determine the depth of the ticking history?
Tried this:
all the time gets 2,000 ticks. The help says that if no time is specified, no more than 2000 ticks are transmitted. Time is specified in milliseconds and seconds are multiplied by 1000.
Also, help specifies that these are ticks for the current session. So, it turns out that you cannot access historical data?
Do you want to get all ticks? :)
First, check if your computer can handle so many ticks (if your computer burns out, it's not my fault):
Do you want to get all the tics? :)
First, check if your computer can handle that many ticks (if your computer burns out, it's not my fault):
Yes I need to know from which date there is data(i.e. from which date you can run a test on real ticks).
And how much is not a problem for the computer to query? To burn out is an exaggeration, more likely to freeze up?
Yes I need to know from which date there is data (i.e. from which date the test can be run on real ticks).
And how much is not a problem for the computer to query? You must be exaggerating, it's more likely to freeze?
Is there a software way to determine the depth of the ticking history?
Tried this:
all the time gets 2,000 ticks. The help says if no time is specified, no more than 2000 ticks are transmitted. Time is specified in milliseconds and seconds are multiplied by 1000.
Also, help specifies that these are ticks for the current session. So, it turns out that you cannot access historical data?
You can not get all ticks for the symbol, if they are more than INT_MAX, because the return value
of CopyTicks function is integer. Therefore, you need to get them in parts.
You cannot get all the ticks per character if they are greater than INT_MAX, because the return value
of the CopyTicks function is integer. Therefore you have to get them in parts.
Nevertheless, it is possible to find out the starting date of ticks by requesting only 20000 (twenty thousand) ticks - the main thing is to specify the starting date, which guarantees that on this date there were no ticks yet, and 1971 is the best way to do it.
Requested a lot of data, really strong braking has started:
For my task, 100 ticks is enough. Thanks anyway!
Yes, custom charts and own datafeeds will be available soon.
Hi Renat, any update about these features ? (sorry if it's somewhere else I didn't find it).
Hi Renat, any update about these features ? (sorry if it's elsewhere I haven't found it).