Errors, bugs, questions - page 1114

 

Error in MQL5 Reference / Trading Functions / OrderGetTicket

In the example given in the article the line

type          =EnumToString(ORDER_TYPE);

will not return the order type.

 
Why can't I download a demo version of a paid indicator for MetaTrader4 from Market?
 
A100:
What's the difference? And then it's a runtime error, not a compilation error.
I mean, macros are designed for strings and NULL is not a string literal and there's no problem replacing it with ""
 
It's probably not about the macro
void OnStart()
{
        string str1 = "" + NULL;        //нормально
        string str2 = NULL + "";        //нормально
        string str3 = NULL + "" + NULL; //ошибка выполнения
}
 
The string is converted to int and there is no warning
void f( int x )          { Print( "f1=", dt ); }
void f( const string& x ) { Print( "f2=", dt ); }

void OnStart()
{
        f( "AAA" );
}
Result: f1=100
 
A100:
The string is converted to int and there is no warningResult: f1=100

How about this?

void f( string x )
 
TheXpert:

How about this?

void f( const string x ) { Print( "f2=", dt ); }
So the result: f2=100, so I think the warning should be higher
 
Hi all. I followed the link that questions about bugs and glitches in MQL4 should be posted here. or is it wrong?
 
IGHud:
Hi all. I followed the link that questions about bugs and glitches in MQL4 should be posted here. or is it wrong?
It's better to post it here
MQL4: форум по механическим торговым системам и тестированию стратегий
  • www.mql5.com
MQL4: форум по механическим торговым системам и тестированию стратегий
 
A100:
So the result is f2=100, so I think the warning above should be
It shouldn't be a warning, it should be selecting the correct function. And the line to the int is not a warning, it should be an error, imho.
Reason: