Testing 'CopyTicks' - page 46

 
Igorz2006:
Thank you, I will look into it

See also this answer to your question:

Forum on trading, automated trading systems and trading strategy testing

Universal Expert Advisor for Cryptoexchange for more than one pair!

Vladimir Karputov, 2020.05.18 14:29

You need to connect to a trade server which broadcasts cryptocurrency quotes and then execute

Download price history#


 
installed mt4, makes it easy
 

Forum on trading, automated trading systems and trading strategy testing

MT5 and Speed in Action

fxsaber, 2020.06.01 11:43

What is the reason for this EA not alerts?
const MqlTick GetMarketWatchTick( void )
{
  MqlTick Tick = {0};
  
  ::SymbolInfoTick(_Symbol, Tick);
  
  return(Tick);
}

const MqlTick GetLastHistoryTick()
{
  MqlTick Tick[1];
  
  ::CopyTicks(_Symbol, Tick, COPY_TICKS_ALL, 0, 1);
  
  return(Tick[0]);
}

void OnTick()
{
  if (GetMarketWatchTick().time_msc > GetLastHistoryTick().time_msc) // Тик из Обзора рынка свежее, чем последний тик из истории.
    Alert("Hello!");
}


At the same time the same check, sewn into the live trading EA on the same Terminal, Alertit. What could be the reason for this?

 

In previous episodes.

On the left is a request on the Combat Terminal for a 10-second interval of the current day. Combat - running for several days, on each tick calls CopyTicks* to get fresh ticks.

On the right - just started Terminal, requesting the same 10-second interval.

You can see that there are five more ticks on the right. It means that the DB of ticks is formed with errors in the Terminal.

Be vigilant! MT5 skips its own historical ticks, which came (I checked) to OnTick via SymbolInfoTick.

 
fxsaber:

In previous episodes.


Be vigilant! MT5 misses its own historical ticks, which came (checked) to OnTick via SymbolInfoTick.

It's sad, I'm using intensely tick data stream in my work. It's not clear if it's a terminal error or it's meant to be.

 
fxsaber:

In previous episodes.

On the left is a request on the Combat Terminal for a 10-second interval of the current day. Combat - running for several days, on each tick calls CopyTicks* to get fresh ticks.

On the right - just started Terminal, requesting the same 10-second interval.

You can see that there are five more ticks on the right. It means that the DB of ticks is formed with errors in the Terminal.

Be vigilant! MT5 skips its own historical ticks, which came (I checked) to OnTick via SymbolInfoTick.

At first glance, it seems more like a bug than conscious filtering for some reason (missing ticks don't seem to stand out). Or am I wrong?

 
Maksim Emeliashin:

Sadly, I am using the tick data stream intensively in my work. It's not clear if it's a terminal bug or if it's meant to be.

Aleksey Nikolayev:

At first glance, it looks more like a bug than deliberate filtering for some purpose (missing ticks don't seem to stand out much). Or am I wrong?

The terminal generates a database of ticks for the current day, if there are no connection failures. It is much faster and more economical.

But there is an error in this tick database forming algorithm.

 
fxsaber:

The terminal generates a database of ticks for the current day if there are no connection interruptions. This is much faster and more economical.

But there is an error in this tick database generation algorithm.

And if we request it at the end of the day, there is already a gap?

Doubtful thesis about no connection failures, rescans/switching happens regularly.

If the correct ticks were in memory, it wouldn't be difficult to write them without error. More likely, there's an integrity check or assembly error somewhere.

 
Andrey Khatimlianskii:

And if you query at the end of the day, is the pass already there?

It seems that the first request for the past 24 hours updates the tick database via synchronisation with the server.

Questionable thesis about no connection failures, rescans/switching happens regularly.

If the correct ticks were in memory, it wouldn't be hard to write them without errors. More likely, there's an integrity check or assembly error somewhere.

SymbolInfoTick caught at least one tick that wasn't in the database.

 
fxsaber:

It seems that the first query for the past 24 hours updates the tick database via synchronisation with the server.

SymbolInfoTick caught at least one tick that was not in the database.

Only @renat can answer here. Or @Slava

Reason: