Tick story - page 15

 

Please clarify the COPY_TICKS_INFO tick receiving flag (only Bid and Ask) - can Bid and Ask still be with the value "0" or in COPY_TICKS_INFO mode - Bid and Ask will not contain zeros and the tick flow will be similar to the onein the terminal, in the "Market Watch" window, "Ticks" tab?


 
Karputov Vladimir:

Please clarify the COPY_TICKS_INFO tick receipt flag (only Bid and Ask) - can Bid and Ask continue with the value "0" or in COPY_TICKS_INFO mode - Bid and Ask will not contain zeros and the tick flow will be similar to the onein the terminal, in "Market Watch" window, "Ticks" tab?


If Renat is to be believed, it depends on the liquidity provider.

Is your history from the beginning of today swinging normally? All of it? Without the spikes I described below?

 
Tapochun:

If Renat is to be believed, it all depends on the liquidity provider.

Is your story from the beginning of today swinging normally? All of it? Without the spikes I described below?

I'll only check that in the evening - with these ticks the whole 3G limit is gone :(.
 
Karputov Vladimir:
I'll only check that tonight - with those ticks, the whole 3G limit is gone :(.
OK, I'm waiting. Because apparently it's of interest to both of us.
 
Tapochun:
Good, I'm waiting. Because apparently it's interesting to both of us.
I'm interested in the tester just working on them, that's all... so that when I access the current bid or ask in the tester, it will give me real prices and not simulated ones. I don't know why I need a tick history in the form of an array...
 
Tapochun:

...

Is your story from the beginning of today downloading normally? All of it? Without the jumps I described below?

I'm downloading everything normally, no gaps in the history.

Try opening the terminal log in Notepad... Maybe that's it()Added: Looked at your log more closely - that's not it...

MP      0       14:51:41.121    123123 (EURUSD,H1)      OnStart: #870052 2015.10.16 23:59:03: spread = 0, ask = 0.00000, bid = 0.00000, last = 1.13474
KP      0       14:51:41.121    123123 (EURUSD,H1)      OnStart: #870053 2015.10.16 23:59:03: spread = 7, ask = 1.13481, bid = 1.13474, last = 0.00000
KO      0       14:51:41.121    123123 (EURUSD,H1)      OnStart: #870054 2015.10.16 23:59:03: spread = 0, ask = 0.00000, bid = 0.00000, last = 1.13474
IO      0       14:51:41.121    123123 (EURUSD,H1)      OnStart: #870055 2015.10.16 23:59:06: spread = 0, ask = 0.00000, bid = 0.00000, last = 1.13474
IN      0       14:51:41.121    123123 (EURUSD,H1)      OnStart: #870056 2015.10.16 23:59:06: spread = 8, ask = 1.13482, bid = 1.13474, last = 0.00000
NM      0       14:51:41.121    123123 (EURUSD,H1)      OnStart: #870057 2015.10.16 23:59:10: spread = 0, ask = 0.00000, bid = 0.00000, last = 0.00000
NM      0       14:51:41.121    123123 (EURUSD,H1)      OnStart: #870058 2015.10.19 00:00:02: spread = 0, ask = 0.00000, bid = 0.00000, last = 0.00000
JL      0       14:51:41.121    123123 (EURUSD,H1)      OnStart: #870059 2015.10.19 00:01:11: spread = 0, ask = 0.00000, bid = 0.00000, last = 1.13546
IK      0       14:51:41.121    123123 (EURUSD,H1)      OnStart: #870060 2015.10.19 00:01:11: spread = 145, ask = 1.13691, bid = 1.13546, last = 0.00000
DK      0       14:51:41.121    123123 (EURUSD,H1)      OnStart: #870061 2015.10.19 00:01:23: spread = 0, ask = 0.00000, bid = 0.00000, last = 0.00000
KJ      0       14:51:41.121    123123 (EURUSD,H1)      OnStart: #870062 2015.10.19 00:01:26: spread = 145, ask = 1.13691, bid = 1.13546, last = 0.00000
 
Tapochun:
Okay, I'm waiting. Because apparently it's of interest to both of us.

Here's what you asked for:

2015.10.19 19:22:43.660 CopyTicks (USDCAD,H1)   Тик: 2015.10.16 23:59:01 bid: 0.0 ask: 0.0 last: 1.29161 [i]
2015.10.19 19:22:43.660 CopyTicks (USDCAD,H1)   Тик: 2015.10.16 23:59:01 bid: 1.29161 ask: 1.29217 last: 0.0 [i]
2015.10.19 19:22:43.660 CopyTicks (USDCAD,H1)   Тик: 2015.10.16 23:59:02 bid: 0.0 ask: 0.0 last: 1.29161 [i]
2015.10.19 19:22:43.660 CopyTicks (USDCAD,H1)   Тик: 2015.10.16 23:59:02 bid: 1.29161 ask: 1.29219 last: 0.0 [i]
2015.10.19 19:22:43.660 CopyTicks (USDCAD,H1)   Тик: 2015.10.16 23:59:02 bid: 0.0 ask: 0.0 last: 1.29161 [i]
2015.10.19 19:22:43.660 CopyTicks (USDCAD,H1)   Тик: 2015.10.16 23:59:02 bid: 1.29161 ask: 1.29211 last: 0.0 [i]
2015.10.19 19:22:43.660 CopyTicks (USDCAD,H1)   Тик: 2015.10.16 23:59:02 bid: 0.0 ask: 0.0 last: 1.29161 [i]
2015.10.19 19:22:43.660 CopyTicks (USDCAD,H1)   Тик: 2015.10.16 23:59:02 bid: 1.29161 ask: 1.29218 last: 0.0 [i]
2015.10.19 19:22:43.660 CopyTicks (USDCAD,H1)   Тик: 2015.10.16 23:59:03 bid: 0.0 ask: 0.0 last: 1.29161 [i]
2015.10.19 19:22:43.660 CopyTicks (USDCAD,H1)   Тик: 2015.10.16 23:59:03 bid: 1.29161 ask: 1.29211 last: 0.0 [i]
2015.10.19 19:22:43.660 CopyTicks (USDCAD,H1)   Тик: 2015.10.16 23:59:03 bid: 0.0 ask: 0.0 last: 1.29161 [i]
2015.10.19 19:22:43.660 CopyTicks (USDCAD,H1)   Тик: 2015.10.16 23:59:03 bid: 1.29161 ask: 1.29218 last: 0.0 [i]
2015.10.19 19:22:43.660 CopyTicks (USDCAD,H1)   Тик: 2015.10.16 23:59:03 bid: 0.0 ask: 0.0 last: 1.29161 [i]
2015.10.19 19:22:43.660 CopyTicks (USDCAD,H1)   Тик: 2015.10.16 23:59:03 bid: 1.29161 ask: 1.29211 last: 0.0 [i]
2015.10.19 19:22:43.660 CopyTicks (USDCAD,H1)   Тик: 2015.10.16 23:59:04 bid: 0.0 ask: 0.0 last: 1.29161 [i]
2015.10.19 19:22:43.660 CopyTicks (USDCAD,H1)   Тик: 2015.10.16 23:59:04 bid: 1.29161 ask: 1.29217 last: 0.0 [i]
2015.10.19 19:22:43.660 CopyTicks (USDCAD,H1)   Тик: 2015.10.16 23:59:06 bid: 0.0 ask: 0.0 last: 1.29178 [i]
2015.10.19 19:22:43.660 CopyTicks (USDCAD,H1)   Тик: 2015.10.16 23:59:06 bid: 1.29178 ask: 1.2922 last: 0.0 [i]
2015.10.19 19:22:43.660 CopyTicks (USDCAD,H1)   Тик: 2015.10.16 23:59:06 bid: 0.0 ask: 0.0 last: 1.29178 [i]
2015.10.19 19:22:43.660 CopyTicks (USDCAD,H1)   Тик: 2015.10.16 23:59:06 bid: 1.29178 ask: 1.29216 last: 0.0 [i]
2015.10.19 19:22:43.660 CopyTicks (USDCAD,H1)   Тик: 2015.10.16 23:59:07 bid: 0.0 ask: 0.0 last: 1.29178 [i]
2015.10.19 19:22:43.660 CopyTicks (USDCAD,H1)   Тик: 2015.10.16 23:59:07 bid: 1.29178 ask: 1.29212 last: 0.0 [i]
2015.10.19 19:22:43.660 CopyTicks (USDCAD,H1)   Тик: 2015.10.16 23:59:07 bid: 0.0 ask: 0.0 last: 1.29178 [i]
2015.10.19 19:22:43.660 CopyTicks (USDCAD,H1)   Тик: 2015.10.16 23:59:07 bid: 1.29178 ask: 1.29216 last: 0.0 [i]
2015.10.19 19:22:43.660 CopyTicks (USDCAD,H1)   Тик: 2015.10.16 23:59:08 bid: 0.0 ask: 0.0 last: 1.29178 [i]
2015.10.19 19:22:43.660 CopyTicks (USDCAD,H1)   Тик: 2015.10.16 23:59:08 bid: 1.29178 ask: 1.29219 last: 0.0 [i]
2015.10.19 19:22:43.660 CopyTicks (USDCAD,H1)   Тик: 2015.10.16 23:59:08 bid: 0.0 ask: 0.0 last: 1.29178 [i]
2015.10.19 19:22:43.660 CopyTicks (USDCAD,H1)   Тик: 2015.10.16 23:59:08 bid: 1.29178 ask: 1.29211 last: 0.0 [i]
2015.10.19 19:22:43.660 CopyTicks (USDCAD,H1)   Тик: 2015.10.16 23:59:09 bid: 0.0 ask: 0.0 last: 1.29174 [i]
2015.10.19 19:22:43.660 CopyTicks (USDCAD,H1)   Тик: 2015.10.16 23:59:09 bid: 1.29174 ask: 1.29221 last: 0.0 [i]
2015.10.19 19:22:43.660 CopyTicks (USDCAD,H1)   Тик: 2015.10.16 23:59:09 bid: 0.0 ask: 0.0 last: 1.29158 [i]
2015.10.19 19:22:43.660 CopyTicks (USDCAD,H1)   Тик: 2015.10.16 23:59:09 bid: 1.29158 ask: 1.29213 last: 0.0 [i]
2015.10.19 19:22:43.660 CopyTicks (USDCAD,H1)   Тик: 2015.10.16 23:59:09 bid: 0.0 ask: 0.0 last: 1.2916 [i]
2015.10.19 19:22:43.660 CopyTicks (USDCAD,H1)   Тик: 2015.10.16 23:59:09 bid: 1.2916 ask: 1.29213 last: 0.0 [i]
2015.10.19 19:22:43.660 CopyTicks (USDCAD,H1)   Тик: 2015.10.16 23:59:10 bid: 0.0 ask: 0.0 last: 0.0 [i]
2015.10.19 19:22:43.660 CopyTicks (USDCAD,H1)   Тик: 2015.10.19 00:00:02 bid: 0.0 ask: 0.0 last: 0.0 [i]
2015.10.19 19:22:43.660 CopyTicks (USDCAD,H1)   Тик: 2015.10.19 00:01:35 bid: 0.0 ask: 0.0 last: 1.29041 [i]
2015.10.19 19:22:43.660 CopyTicks (USDCAD,H1)   Тик: 2015.10.19 00:01:35 bid: 1.29041 ask: 1.29146 last: 0.0 [i]
2015.10.19 19:22:43.660 CopyTicks (USDCAD,H1)   Тик: 2015.10.19 00:01:47 bid: 0.0 ask: 0.0 last: 0.0 [i]
2015.10.19 19:22:43.660 CopyTicks (USDCAD,H1)   Тик: 2015.10.19 00:01:49 bid: 1.29041 ask: 1.29146 last: 0.0 [i]
2015.10.19 19:22:43.660 CopyTicks (USDCAD,H1)   Тик: 2015.10.19 00:01:54 bid: 0.0 ask: 0.0 last: 1.28987 [i]
2015.10.19 19:22:43.660 CopyTicks (USDCAD,H1)   Тик: 2015.10.19 00:01:54 bid: 1.28987 ask: 1.29093 last: 0.0 [i]
2015.10.19 19:22:43.660 CopyTicks (USDCAD,H1)   Тик: 2015.10.19 00:01:56 bid: 0.0 ask: 0.0 last: 1.28978 [i]
2015.10.19 19:22:43.660 CopyTicks (USDCAD,H1)   Тик: 2015.10.19 00:01:56 bid: 1.28978 ask: 1.29083 last: 0.0 [i]
2015.10.19 19:22:43.660 CopyTicks (USDCAD,H1)   Тик: 2015.10.19 00:01:57 bid: 0.0 ask: 0.0 last: 1.2898 [i]
2015.10.19 19:22:43.660 CopyTicks (USDCAD,H1)   Тик: 2015.10.19 00:01:57 bid: 1.2898 ask: 1.29086 last: 0.0 [i]

Transition in 24 hours is correct.
Test method: With the terminal on, I erased the tick history files. Then ran the script twice (since there was no history, the first run of the script initialized the history load).

MetaTrader 5 x64 build 1191 started (MetaQuotes Software Corp.)

authorized on MetaQuotes-Demo through Access Point EU1 (ping: 50.99 ms)
 

Obtaining ticks from a specific date does not work, but allows you to upload all available history.

The script itself:

//+------------------------------------------------------------------+
//|                                                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.02"
//--- покажем окно входных параметров при запуске скрипта
#property script_show_inputs
input int  ticks=200;  // количество запрашиваемых тиков
input datetime start=D'2015.10.16 23:59'; // с какой даты запрашивать тики
//---
MqlTick ExTicks[];
//+------------------------------------------------------------------+
//| Script program start function                                    |
//+------------------------------------------------------------------+
void OnStart()
  {
//--- запросим тики
   int copied=CopyTicks(_Symbol,ExTicks,COPY_TICKS_ALL,(ulong)start,200);
//--- если тики получены, то выведем на график значения 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");
  }
//+------------------------------------------------------------------+


and the log:

2015.10.19 19:57:53.068 CopyTicks_1_02 (USDCAD,H1)      Получено тиков: 200 код ошибки: 0
2015.10.19 19:57:53.068 CopyTicks_1_02 (USDCAD,H1)      Тик: 2011.12.19 00:00:09 bid: 1.0389 ask: 1.03904 last: 0.0 [0]
2015.10.19 19:57:53.068 CopyTicks_1_02 (USDCAD,H1)      Тик: 2011.12.19 00:05:57 bid: 1.03887 ask: 1.03908 last: 0.0 [199]
2015.10.19 19:57:53.068 CopyTicks_1_02 (USDCAD,H1)      Size 0 Mb
You can see that the history has been downloaded since 2011.12.19 (don't look at the file size "0" - it's just not the first run).
Files:
 
Maxim Dmitrievsky:
I'm interested in the tester just to work with them, and that's all... so that when I refer to the current bid or ask in the tester, it would give me real prices, not simulated ones. I don't know why I need a tick history in the form of an array...

This will, as promised, be in the next build and I'm sure it will have its own features.

 
Andrey Miguzov:

I'm downloading fine, no gaps in my history.

Try opening the terminal's log in Notepad... Maybe that's it()Added: Looked more closely at your log - that's not it...

Thanks, I don't know what the hell it was about. Came in tonight, took the story down again, re-downloaded, and everything was fine.
Reason: