Errors, bugs, questions - page 979

 

Greetings!

Today again the XAUUSD Expert Advisor traded at a strange price:

XAUUSD spike

AlpariNZ-MT5 server, demo account.

Is it a simple non-market price ejection? Has anybody encountered it?

 
Used the profiler, it's certainly a unique thing, I've never seen anything like it before, convinced of the severity of the graphic elements. The question is how best to organise the same label updating every tick?
 
vlad_123:

Greetings!

The XAUUSD Expert Advisor traded at a strange price again today:

AlpariNZ-MT5 server, demo account.

Is it a simple non-market price ejection? Has anybody encountered it?

If it was a demo, you could ask a broker for a real account and on the basis of his answer ask questions to Service Desk. And there can be no complaints about the toys.
 
Denisimus:
Hello, the signals tab in MT4 is gone, was there in the morning, came in the evening and it's gone. And now the popup is not executing, what to do please advise
The answer is most likely on your computer, you can reinstall the terminal.
 
zfs:
If it was a demo, if it were a real account you could ask the broker and already ask questions to Service Desk on the basis of his response. I'm just wondering what is the reason for that.

I wouldn't say no to such a 'binge' in real life either... ;-)

But this situation is not the first time, and it confuses statistics of Expert Advisors.

I don't have any complaints, I just wonder why it happens.

 
vlad_123:

I wouldn't say no to such a 'binge' in real life either... ;-)

But this situation is not the first time, and it confuses statistics of Expert Advisors.

I have no complaints, I just wonder why it happens.

I don't have any complaints, I just wonder what is wrong.
 
voix_kas:

To improve programming purity I would like to ask the public about this.

Suppose there is a flag (bool Flag) declared globally. When certain events/conditions occur, it must be set to a certain value.

The first variant:

Second option:

Which option:

1. faster in terms of performance?

2. If I may say so, "more professional"?

This code section is supposed to get control quite often, e.g. every tick.

Renat:
Of course, the first variant is faster. Fewer instructions, and also one less comparison/branching.

voix_kas:
Thank you.

Still decided to check for sure. Strange as it may seem, the results show that the comparison operation is faster than the assignment operation.

void OnStart(void) {
  int Count = 1000000000;
  bool Value1 = true;
  uint start = GetTickCount();
  for (int i = 0; i < Count; i++) {
    Value1 = false;
  }
  Print("Without 'if' = " + IntegerToString(GetTickCount() - start));
  start = GetTickCount();
  for (int i = 0; i < Count; i++) {
    if (Value1) Value1 = false;
  }
  Print("With 'if' = " + IntegerToString(GetTickCount() - start));
}

Result:

2013.04.30 18:35:41     Test (EURUSD,M5)        With 'if' = 1856
2013.04.30 18:35:39     Test (EURUSD,M5)        Without 'if' = 2418
2013.04.30 18:31:03     Test (EURUSD,M5)        With 'if' = 1857
2013.04.30 18:31:02     Test (EURUSD,M5)        Without 'if' = 2418
2013.04.30 18:30:54     Test (EURUSD,M5)        With 'if' = 1888
2013.04.30 18:30:52     Test (EURUSD,M5)        Without 'if' = 2418

Experts, could you please comment on the situation?

Документация по MQL5: Основы языка / Операции и выражения / Операции присваивания
Документация по MQL5: Основы языка / Операции и выражения / Операции присваивания
  • www.mql5.com
Основы языка / Операции и выражения / Операции присваивания - Документация по MQL5
 
voix_kas:

I decided to check for sure, though. Oddly enough, the results show that the comparison operation is faster than the assignment operation.

Result:

Experts, could you please comment on the situation?

Can't you see that in the second case assignment is performed only once?

In other words, all that's left is comparison, which is much faster than direct assignment, which is the case in the first test. The results are absolutely correct.

 
Renat:

Can't you see that in the second case the assignment is done only once?

That is, all that is left is the comparison, which is much faster than the direct assignment, which is in the first test. The results are absolutely correct.

So, it turns out that I formulated my question differently the first time?
 
voix_kas:
So, it appears that I phrased my question differently the first time?

Absolutely.

And it's too bad that you don't understand such simple things.

Reason: