Errors, bugs, questions - page 2139

 
fxsaber:

I write exactly those kinds of EAs.

I have seen your codes, you are a very good and competent programmer...


The situation is not even saved

   if(!TerminalInfoInteger(TERMINAL_CONNECTED))
     {
      Print(m_lan?"Нет подключения к сети интернет! ":"No connection to the Internet! ");
      return false;
     }
 
Vladimir Pastushak:

The situation is not even saved

Search the forum for ways to detect a connection in MT5. The topic should be a beaten up one.

 
fxsaber:

Search the forum for ways to identify a connection in MT5. The topic must be a beaten up one.

The thing is that even once connected the account number is 0 for a while.

 

The help text says

Calling PlaySound() with NULL stops the sound.

But in fact Alert PlaySound(NULL) does not stop sounding, it should.

 
Vladimir Pastushak:

Indicators do not always return ACCOUNT_LOGIN when starting the terminal

0 11:00:01.880 Custom indicator tester EURUSD,H1: loaded successfully
0 11:00:01.887 tester EURUSD,H1: OnInit 0 < ---- AccountInfoInteger(ACCOUNT_LOGIN) returned 0
0 11:00:01.887 tester EURUSD,H1: initialized
0 11:00:01.887 tester EURUSD,H1: OnCalculate 0 < ---- AccountInfoInteger(ACCOUNT_LOGIN) returned 0
0 11:00:05.980 tester EURUSD,H1: OnCalculate 0 < ---- AccountInfoInteger(ACCOUNT_LOGIN) returned 0
0 11:00:06.654 tester EURUSD,H1: OnCalculate 0 < ---- AccountInfoInteger(ACCOUNT_LOGIN) returned 0
0 11:00:07.030 tester EURUSD,H1: OnCalculate 442394 < ---- AccountInfoInteger(ACCOUNT_LOGIN) returned account number
0 11:00:07.040 tester EURUSD,H1: OnCalculate 442394 < ---- AccountInfoInteger(ACCOUNT_LOGIN) returned account number

Source code

I may be wrong, but in my opinion no program can work if account number is not known.....

What does an indicator have to do with account number? What will change in the indicator if you change the user's account number? If you want to bind an indicator to a specific account, use the market.

Vladimir Pastushak:

because 99.99% of advisors are "sharash montash" ....

I believe that every quality EA should keep its own operation log, either during operation or when unloading the EA the user should get the operation log on demand. In case of critical errors it is mandatory!

By critical error I mean disconnection, requotes, slow code.

So is the problem with the indicator or the Expert Advisor? Why are you lumping everything into one pile? What is the connection between the indicator and requotes?

 
Vladimir Pastushak:

The thing is, even if you connect, the account number is 0 for a while.

There you have it, the condition for a normal connection! As soon as it is not zero, the connection is there, otherwise it is not.

 
Alexey Viktorov:

What does an indicator have to do with an account number?

Almost as much as an EA. An indicator can be a "trading" indicator.

What will change in the indicator if you change the user's account number?

Only zeroing of prev_calculated with corresponding call of Calculate event.

 
Vladimir Pastushak:

The help text says

Calling PlaySound() with NULL stops the sound.

But in fact Alert PlaySound(NULL) does not stop sounding, it should.

PlaySound(NULL) stops PlaySound() currently sounding, not Alert()

 

Thecalculation of the indicator should in no way depend on the connection. Nor should it depend on the availability of internet.

Indicators are calculated on existing data and recalculated when new data arrives.

 
Slava:

The calculation of the indicator should not depend on the connection. And the availability of the Internet.

Indicators are read on existing data and recalculated when new data arrives.

There are indicators that have zero indicator buffers and OnCalculate is fictitiously present. The indicator is only a type of MQL-prog, not the calculation.

Reason: