Errors, bugs, questions - page 878

 
Vladon:

Well, let's say there is an array of trades, and it also has a balance of deposits and withdrawals. IMHO.

an option! Thank you.
 
no problem.
 

Emails have stopped being sent. This is the error in the logbook:

//---

What can this be connected to?

I've used these settings before and everything worked:

 
Check the password and rewrite it, please.
 

Troubles in templates

template <typename TTT>
string _print( const string str, TTT value ) { return ( value != NULL ? str + "=" + value : NULL ); }

void OnStart()
{
        int a100 = 5;
	string str = _print( "a100", a100 );
	Comment( str );
}

Invalid EX5 file - error at runtime level, but if you swap:

template <typename TTT>
string _print( TTT value, const string str ) { return ( value != NULL ? str + "=" + value : NULL ); }

void OnStart()
{
        int a100 = 5;
        string str = _print( a100, "a100" );
        Comment( str );
}

everything is fine.

 
Yes, that will be fixed. Also discovered.
 
Can you please tell me how to trace in the EA if there was a connection failure? In the indicator the variable prev_calculated is zeroed, but in the EA?
 

Are anonymous enum's allowed or not? The help says that, unlike C++, they are not, but the example:

enum {
        TORDER_BUY = 2,
        TORDER_SELL
};

so far it works.

 
A100:

Are anonymous enum's allowed or not? The help says that, unlike C++, they are not, but the example:

so far it works.

Allowed for the sake of compatibility with existing code and to simplify code porting.
 
Alex5757000: Can you please tell me how to trace in the Expert Advisor that the connection is broken? The variable prev_calculated is zeroed in the indicator, but in the EA?

TERMINAL_CONNECTED

Connection to the trade server

bool

Документация по MQL5: Стандартные константы, перечисления и структуры / Состояние окружения / Состояние клиентского терминала
Документация по MQL5: Стандартные константы, перечисления и структуры / Состояние окружения / Состояние клиентского терминала
  • www.mql5.com
Стандартные константы, перечисления и структуры / Состояние окружения / Состояние клиентского терминала - Документация по MQL5