Testing 'CopyTicks' - page 20

 

When non-zero From inside CopyTicks searches (probably a binary search) for a place to start - index in the internal database.

Please add a function which returns the index in the database by time. Then this task will be possible to solve optimally

fxsaber:
What is the optimal (fastest) algorithm to get the ticks from_time to_time?
 

For good reason, the topic "What is a tick?" has been deleted. I will give some of my answers from it from the surviving history

В парадигме MT тик - это то, что пришло от биржи. Единица стрима(-ов). Поэтому два подряд идущих тика могут полностью совпадать (MqlTick), но при этом не обозначать одно и то же событие. Помимо MqlTick-данных есть еще номер тика, который не показывается в MT. И есть MT-нюанс с тиками, когда сама история тиков переписывается задним числом из-за нескольких источников получения тиков.

two ticks in a row (causing a Tick/Calculate event) may be identical in structure MqlTick (all prices and volumes and time and flags are equal), but actually be different. Bid/Ask is always a multiple of TickSize. Last (not on the exchange) may be not a multiple of TickSize. TickSize can be many times larger than Point (look RTS, for example). So it is not quite correct to talk about Point in this case.

It may be useful. SymbolInfoTick is an unsynchronized function. This means that it may return different ticks at different places of OnTick. Moreover, even if you call SymbolInfoTick at the beginning of OnTick, the resulting tick won't be the initiator of the Tick event for which OnTick is triggered. The fields of its MqlTick structure won't be equal to the tick that came from the exchange, because these fields are synthesized by the terminal itself and are equal to Marketwatch values.

 
Why are the INFO-types in the forex tester not the same as the ALL-types?
 
Running the Expert Advisor in the Strategy Tester
void OnTick()
{
  static bool FirstRun = true;
  
  if (FirstRun)
  {
    MqlTick Ticks[1];
    
    if (SymbolInfoTick(_Symbol, Ticks[0]))  
      Print(CopyTicks(_Symbol, Ticks, COPY_TICKS_ALL, Ticks[0].time_msc + 1)); // Сколько тиков со временем больше последнего
    FirstRun = false;
  }
}

Result

2016.10.15 13:23:57.689 2016.10.12 00:00:16   1

Should return zero, but returns one. Ticks[] does not change. Bug!

 
fxsaber:
Launching an Expert Advisor in the Strategy Tester
void OnTick()
{
  static bool FirstRun = true;
  
  if (FirstRun)
  {
    MqlTick Ticks[1];
    
    if (SymbolInfoTick(_Symbol, Ticks[0]))  
      Print(CopyTicks(_Symbol, Ticks, COPY_TICKS_ALL, Ticks[0].time_msc + 1)); // Сколько тиков со временем больше последнего
    FirstRun = false;
  }
}

Result

2016.10.15 13:23:57.689 2016.10.12 00:00:16   1

It should return zero, but it returns one. In this case, Ticks[] doesn't change. Bug!

Could it be the weekend?

From the help. CopyTicks The function gets the ticks_array of the ticks accumulated by the terminal during the current working session.

 
Alexey Volchanskiy:

Could it be the weekend?

From the help file. CopyTicks The function gets the ticks accumulated by the terminal during the current working session into ticks_array array.

There's a bug in the tester.
 

CopyTicks performance problem.

Robo

Network 'xxx': authorized on RoboForexEU-MetaTrader 5 through Europe #1 (ping: 56.66 ms)

BCS

Network 'xxx': authorized on BCS-MetaTrader5 through Access Server #2 (ping: 45.53 ms)



This is tick indicator data. In both cases there are 2-3 thousand ticks uploaded. But in robo it is more than an order of magnitude faster.

Saw the same speeds in forex during the day - the market was more agile then. Copitix seems to be slowing down an active marketwatch.

The only chart and the only indicator in both cases. And kopitix was definitely already having quotes uploaded in the database/cache.

 

1) were the stacks on both?

2) were the trade/info ticks separated in their original threads? Complex threads require recalculation and simple issuance

3) what was the actual request?

4) by how many queries were the results validated? Followed and exactly how the test rules were followed: accounting for cold start, discarding outliers, repeatability of results per series, code to reproduce.

Generally speaking, numerical results should be preceded by an exact code so that anyone can repeat them. Otherwise there is no point in discussing it.

 
Renat Fatkhullin:

1) were the stacks on both?

2) were the trade/info ticks separated in their original threads? Complex threads require recalculation and simple issuance

3) what was the actual request?

4) by how many queries were the results validated? Followed and exactly how the test rules were followed: accounting for cold start, discarding outliers, repeatability of results per series, code for reproduction.

Generally speaking, numerical results should be preceded by an exact code so that anyone can repeat them. Otherwise there's no point in discussing it.

I gave you a link to the exact code.

  1. There were no tumblers.
  2. Only INFO-types.
  3. COPY_TICKS_INFO with from > 0.
  4. See the indicator at the link in operation. Repeatability is complete. Cold start excluded. Emissions similar.
 

We'll check it out.

But on the lack of a tumbler in one of the servers, there are big doubts. It doesn't matter that the tumbler is not rendered. If a symbol has it, its data is always present and a more complex issuing algorithm works when requesting ticks.