Market closed - page 8

 
fxsaber:

The script in the chart comment shows this bug

Is there an application for this problem in the SD? Don't you have more than a hundred of them still unclosed?
 

Vasiliy Pushkaryov:
В СД есть заявка по этой проблеме?

Support Team2018.01.24 07:13

You have to keep in mind that Windows (Unix too) has never been a real-time operating system. This means that time measurement in such a system is not a priority and allows for inaccuracies.

Secondly, the timer in the system is based on messages and their queues. In a winds application all messages are processed in the main thread. They are processed in a sequential way. With all its implications.

In your case you should choose a critical timer sample. If you choose the smallest - 1 millisecond, then be ready to waste 1000 times more on message generation, message fetching and message processing than if you choose a 1000 msec sample. So, look for a reasonable compromise.

Don't you have more than a hundred of them still open?

Yes.

 

fxsaber:

Tried to sync up like this

Doesn't work. And I have bad thoughts towards MT5 lag. See for yourself how your script will behave with these changes.

Tried it with your code, still lags. Let's wait for more people or more influential employees of the company to pay attention to it, since SD writes that lags are the norm.


 
Vasiliy Pushkaryov:

Tried it with your code, still lags behind. We will wait for more people or more influential employees of the company to pay attention to this, since the SD writes that delays are the norm.

Well, it seems logical, in the Market Watch the time of the last tick on any symbol, and in the symbol window - the time of tick on the symbol. That's why there is disagreement, the ticks don't come at the same time

 
Vitaly Muzichenko:

Well, it seems to make sense, in the market overview the time of the last tick for any symbol, and in the symbol window - the time of tick for the symbol. That's why there is disagreement, the ticks don't come at the same time

TimeCurrent - see Help.

 
fxsaber:

TimeCurrent - see Help.

Well, that's right: the latest server time. No tick - no time, but there is always a tick in the market overview for some pair, so the time does not correspond to the time on the symbol, where the tick was "long ago".

 
Vitaly Muzichenko:

Well that's right: the latest server time. No tick - no time, but there is always a tick in the market review for some pair, so the time does not correspond to the time on the symbol, where the tick was "long ago".

TimeCurrent outputs the same values for any MQL-prog at any given time.

 
Vitaly Muzichenko:

Well that's right: the latest server time. No tick - no time, but there is always a tick in the market overview for some pair, so the time does not correspond to the time on the symbol where the tick was "long ago"

I remembered that too. But the reference there added:

"In other cases (call in OnInit(), OnDeinit(), OnTimer() and so on handlers ) this is the time of arrival of the last quotation for any symbol available in the Market Watch window, the same time that is shown in the title of this window."

In the code it is OnTimer with an interval of 0.5 sec. As you can see in the screenshot above, I can easily manually catch on PrintScreen when the time shown in the window title does not match TimeCurrent().

 
Vasiliy Pushkaryov:

I remembered that too. But there the help added:

"In other cases (call in OnInit(), OnDeinit(), OnTimer() and so on handlers ) this is the time of arrival of last quotation by any symbol available in Market Watch window, the same time that is shown in the title of this window."

The help originally lied:

In theOnTick()handler, this function will return the arrival time of the tick being handled

This, of course, is not true. The script, to be sure
void OnTick()
{
  Print(TimeCurrent());
  
  Sleep(10000);

  Print(TimeCurrent());  
}
 
fxsaber:

The certificate initially lied:

It certainly wasn't. A script to make sure
It's not quite clear what's wrong here.
Reason: