Errors, bugs, questions - page 2810

 
A100:

## has a higher priority

In my opinion, it's not even about priority, but about the fundamentally flawed macro substitution order:

#define  aaa
#define  XY( x, y )      x##y
#define  XY2( y )        XY( aaa, y )
void OnStart()
{
        int XY2( bbb ) = 5;
        Print( aaabbb ); //Error: 'aaabbb' - undeclared identifier
}
and it was expected to be OK - as in C++
 
A100:

In my opinion, it's not even about priority, but about the fundamentally wrong order of macro substitution:

while everything was expected to be okay - as in C++
XY2(bbb) in your example unfolds into bbb. Everything is correct here.
#define aaa remove)))
 
Vladimir Simakov:
XY2(bbb) in your example unfolds into bbb. All right here.
#define aaa remove)))

You seem to be out of your depth. First check the example in C++ and then write

#define aaa - there is no need to remove it; it is intended to show a fundamental error. In C++, macros are designed in such a way that any required result can be projected, while in MQL it turns out that not any result can be projected.

 
A100:

You seem to be out of your depth. First check the example in C++, then write

Oops. You live and learn.)
 

The CopyTicksRange(_Symbol, ticks, COPY_TICKS_ALL, 0, ULONG_MAX) call returns 0 copied ticks and error code 0 in the tester.

If it's impossible to request all ticks, or, for example, if there's not enough memory, it's a good idea to show some error.

Now it looks like a hard to catch error in MQL API.

 

After I updated Metatrader 5 64 bit the MQL5 demo stopped starting (although the process is still running in Task Manager). After downloading the installer from MQL5

installer, at an attempt to reinstall it, I get a message: "Sorry, something went wrong. Please try again later." 3 days passed.

Windows 10 PC system. Metatrader 5 Siwssquote works fine

Автоматическое обновление - Для продвинутых пользователей - Справка по MetaTrader 5
Автоматическое обновление - Для продвинутых пользователей - Справка по MetaTrader 5
  • www.metatrader5.com
В платформу встроена система автоматического обновления. Она позволяет своевременно получать и устанавливать новые версии программы. Эту систему отключить нельзя. Порядок обновления При подключении к торговому серверу происходит проверка наличия обновлений платформы. Если найдено обновление какого-либо из компонентов торговой платформы...
 

Good afternoon, please advise - after MT5 update the indicator hangs the terminal and the whole computer. The indicator is homemade, of course, but it worked before the update. Can anybody suggest what's wrong? My knowledge is not enough alas.

The indicator is attached.

Files:
 
Sergey Voytsekhovsky:

Good afternoon, please advise - after MT5 update the indicator hangs the terminal and the whole computer. The indicator is homemade, of course, but it worked before the update. Can anybody suggest what's wrong? My knowledge is not enough alas.

Indicator attached.

Stumbles on the second call of the search for objects:

   if(ObjectFind(0,InpName_TL_Support)<0)
 
Vladimir Karputov:

Stumbles on the second object search call:

Thank you very much for your feedback. Can you tell me how to look for such stumbles in the future? How did you see it, I can not even run it, everything hangs and does not respond? What may be wrong with this line? According to the instructions.

ObjectFind

returns a negative value if no object is found. How else can I check if it's not compared to zero, so it doesn't stumble ???

 

Can you suggest a third party program that can monitor CPU freezes?

I want to exclude (or confirm) this hypothesis of MT5 braking in real operation.