Errors, bugs, questions - page 1646

 
1aass:

Hi all, I have iPhone 4 apple. I have lost the ability to close orders from my iPhone, what is the reason?I use MetaTrader 4. My brokeris Just2Trader-Demo.

Hello. Please describe your problem in details. Logs / screenshots are required.

Does it work from desktop ?

 
Alexey Navoykov:
Then in your last post both paragraphs contradict each other.

No contradiction

fxsaber:

The difference of two normalised doubles will always be zero if their normalised values are the same.

This statement is true. The following statement is also true

Moreover, it is possible to take two numbers whose normalized values are equal. But their normalized difference will not be equal to zero.

 

Please explain the following behaviour:

 

Forum on trading, automated trading systems and trading strategy testing

Bugs, bugs, questions

fxsaber, 2016.07.22 15:39

I am working in the tester offline. How to make the log not to be clogged with hundreds of thousands of entries?
2016.07.21 07:48:41.578 MQL5.community  authorization failed

Relevant, the Settings -> Community tab is not filled in.
 
Please add a transition to the definition of the relevant operators when ALT+G is pressed.
 
Why are there no default operators "==" and "!=" defined for structures?
struct A { int i; };

int OnStart()
{
  A a, b;
  
  return(a == b); // '==' - illegal operation use
}
 
Why can't return void functions be done? This kind of discrimination is sometimes inconvenient
double Double() { return(0); }
int Int() { return(0); }
void Void() {}

#define  MACROS(NAME,T) T New##NAME() { return(NAME()); }

MACROS(Double, double)
MACROS(Int, int)
MACROS(Void, void) // 'return' - 'void' function returns a value
 
Why is static declared in the function body subbody allowed?
void OnStart()
{
  if (true)
    static int i = 0; // почему допускается static, объявленный в подтеле тела функции?
}
Body (sub-body) is my term. I don't know how to get it right. The meaning should be clear.

 
Is it reasonable (in terms of code performance) to declare all internal (in the main body - not in subteles) variables as static in methods/functions?

For example, I have many objects of the same class. I call the same method on all of them. Would it be faster (better code) to execute such a mass call if all internal variables of corresponding method were made static?
 
fxsaber:

No contradiction

This statement is true. The following statement is also true

Are you sure?

The difference ... will equal zero

and in doing so...

thenormalised difference will not equal zero.

How do you imagine it? If the first is equal, the second will be equal.
Reason: