Errors, bugs, questions - page 418

 

I have been working with MT5 for a couple of days now and noticed that stops and profits can now be edited with the mouse, which is good, but there is a small bug in it. When I move the mouse to the stop, its pointer changes to show that the stop is active for editing, but the pointer also changes when using "Crosshair" tool, which means that if I want to measure distance from the stop, it is not very convenient, because the second point is behind the pointer and I can not see where I am taking it to. I wanted to do PrintScreen, but it does not take a picture of the mouse.

The bottom line: it is not convenient to measure with "Crosshair" from the stop.

 
mql5:
The error is fixed.
The switch-check "fetch" was discussed and we cannot implement correct/correct control.
The value of the switch expression may be anything, for instance:

OK, I see. The compiler cannot control the switch expression's value instead of the programmer.

As a side question, this construct is used in the above example:

enum EV { v1, v2, };
...
   switch(EV(3))

Does it mean that it is acceptable to handle data of an enumerated type not only with named constants (v1, v2, etc.) but also by specifying their ordinal number in the enumeration ( EV(n) )?

...I made such constructions to solve such a question - but here it can be much simpler.

 
Yedelkin:

Does this mean that it is acceptable to refer to data of an enumerated type not only with named constants (v1, v2, etc.) but also by specifying their ordinal number in an enumeration ( EV(n) )?

In this case, just the standard int type conversion to EV is applied. In functional notation.

There are two possible syntactic forms of type conversion in mql5 that are equivalent in result: (Type_name) Value and Type_name(Value).

I mean, it's not some special feature related to enumerations, it's just a normal type conversion.

 
Jhonny:

I have been working with MT5 for a couple of days now and noticed that stops and profits can now be edited with the mouse, which is good, but there is a small bug in it. When I move the mouse to the stop, its pointer changes to show that the stop is active for editing, but the pointer also changes when using "Crosshair" tool, which means that if I want to measure distance from the stop, it is not very convenient, because the second point is behind the pointer and I can not see where I am taking it to. I wanted to do PrintScreen, but it does not take a picture of the mouse.

Bottom line: it is not convenient to measure with "Crosshair" from the stop.

I agree, it is a good observation, but it is not a bug.

Good wishes for MT5

 
MetaDriver:

In this case, just a standard int to EV conversion has been applied. In functional notation.

There are two possible syntactic forms of type conversion in mql5, which are equal in result: (Type_name) Value and Type_name(Value).

I mean, it's not some special feature related to enumerations, it's just a normal type conversion.

Cool! I'll try to digest it. But from what you said, the answer to my question is positive. That's good! Thank you! (Laughs)
 

Cannot start the test in visualisation mode. The visualiser itself starts, but the test does not start. This is what it says in the log:

2011.06.16 21:25:47 EURUSD: symbol synchronized, 2904 bytes of symbol info received
2011.06.16 21:25:47 symbol EURUSD synchronization error
2011.06.16 21:25:47 cannot get history EURUSD,M1
2011.06.06.16 21:25:47 log file "C:\Program Files\MetaTrader 5\Tester\Agent-127.0.0.1-3000\logs\20110616.log" written
2011.06.16 21:25:48 tester agent shutdown

 

Developers.

Is the visual tester really that slow or am I just imagining things?

 
molotkovsm:

Cannot start the test in visualisation mode. The visualiser itself starts, but the test does not start. This is what is written in the log:

2011.06.16 21:25:47 EURUSD: symbol synchronized, 2904 bytes of symbol info received
2011.06.16 21:25:47 EURUSD symbol synchronization error
2011.06.16 21:25:47 cannot get history EURUSD,M1
2011.06.16 21:25:47 log file "C:{Program Files\MetaTrader 5\Tester\Agent-127.0.0.1-3000\logs\20110616.log" written
2011.06.16 21:25:48 tester agent shutdown

The same problem. Agent log can't be opened via specified path.

2011.06.16 22:40:52     tester agent shutdown
2011.06.16 22:40:52     log file "C:\Program Files\MetaTrader 5 - 64\Tester\Agent-127.0.0.1-3000\logs\20110616.log" written
2011.06.16 22:40:52     cannot get history EURUSD,M1
2011.06.16 22:40:52     symbol EURUSD synchronization error
2011.06.16 22:40:52     EURUSD: symbol synchronized, 2904 bytes of symbol info received
2011.06.16 22:40:51     Pentium Dual-Core  T4300 @ 2.10 GHz, 3001 MB
2011.06.16 22:40:51     13 Kb of total initialization data received
2011.06.16 22:40:51     successfully initialized
2011.06.16 22:40:51     expert file added: Experts\Тест.ex5. 2958 bytes loaded
2011.06.16 22:40:51     346 bytes of selected symbols loaded
2011.06.16 22:40:51     196 bytes of input parameters loaded
2011.06.16 22:40:51     1490 bytes of tester parameters loaded
2011.06.16 22:40:51     3788 bytes of group info loaded
2011.06.16 22:40:51     login (build 468)
2011.06.16 22:40:51     initialization finished
2011.06.16 22:40:51     MetaTester 5 started on 127.0.0.1:3000
2011.06.16 22:40:51     MetaTester 5 x64 build 468 (16 Jun 2011)


 
Please provide the code.
 
Renat:
Please give me the code.

Good night, I was wondering if in this code

  if(B >= spred && IND == true && proverka()==true)

after checking B>spred, which is "FALSE", the rest of the values are checked

It increases the test running time, so I have to modify the code in the following way

   if(B >= bar)
    {
     if (IND == true) 
      {
       if (proverka)==true)
        {
         .......

And the most time consuming in terms of calculations ( proverka() - copying of buffer values of an indicator)

I put it last but it does not check the last one. I wonder.

And why so ???

Or it does not check the last one:

 if(B >= bar) if (IND == true) if (proverka()==true)
Reason: