Errors, bugs, questions - page 1113

 
silhouette:

Why does this warning appear on this line?

possible loss of data due to type conversion

This function returns the long type, while your digits are of the int type.

You need it like this:

int digits=(int)SymbolInfoInteger(m_symbol,SYMBOL_DIGITS);

or like this:

long digits=SymbolInfoInteger(m_symbol,SYMBOL_DIGITS);
 
vicmos:

This function returns the long type, but your digits are of the int type.

You need it like this:

or like this:

Thanks, now it's okay.

In Help, by the way, it says int for some reason

SYMBOL_DIGITS

Number of decimal places

int

 
alexey_pak:
Maybe you could elaborate on what kind of error you are making.
For example: (assuming that before I compiled the same script without errors and ran it)
void OnStart()
{
\       Print( TimeCurrent());
}

Then I switch to MetaTrader, run this script and in the tab "Experts" I see a new record: 'AAA.mq5' successfully compiled (the time shows that it is new), but the script itself is not running. In fact, MetaTrader knows that the last attempt to compile - failed, but produces a contradictory message.

 
Good day to you people =), advise! In the Market there is an Expert Advisor, in the test shows good results, but the reviews are bad! In general, the question - is it possible to configure the Expert Advisor for the test and it will behave absolutely differently on the real account? As far as I understand the test only finds entry points according to the algorithm and implements/closes orders.
 
you can
 
Please advise what may be the problem, I subscribed to a signal, an icon appeared that automatic copying of trades is enabled, but trades are not copied.
 
dbc220:
Please advise what may be the problem, I subscribed to the signal, the icon appeared that automatic copying of trades is enabled, but trades are not copied.

What is written in the terminal log?

Please give me the logs.

 
Invalid EX5 file (8)
#define  MACRO( s )              (s + ";" + s)

void OnStart()
{
        ushort ch = ::StringGetCharacter( MACRO( NULL ), 0 );
}
 
A100:

What's so good about it?

ushort ch = ::StringGetCharacter( NULL + ";" + NULL, 0 );
 
TheXpert:

What's so good about it?

What's the difference? And then it's a runtime error, not a compilation error
Reason: