Errors, bugs, questions - page 2940

 
Slava Botalov:

Too bad, we'll have to switch to another one. any suggestions ?

All suggestions are on Google. Any discussion of third parties is forbidden here.

 
Vladimir Karputov:

All suggestions are on Google. Any discussion of third parties is forbidden here.

Got it. THANK YOU for helping me with my question

 
x572intraday:

That's not the point. The question is, where can it be useful, especially for traders, not programmers? I haven't seen such numbers in the terminal, neither in the price scale, nor in the order placement window, everything is the same everywhere (somewhere five digits, somewhere else).

It's not a question of where it can be useful. It is a question of knowing how numbers are represented in computers, knowing that there is no number 0.72352 for computers, but only 0.7235200000000001 that can be printed to 5 digits and for this, there is a function DoubleToString.
 

Cannot copy data:

MqlRates mql_rates[];
bar_kol = Bars("EURUSD", _Period);
copy_rates = CopyRates("EURUSD", _Period, bar_kol, 100, mql_rates);

bar_kol becomes 6105 and copy_rates -1 (error) when trying to copy data from 6105 bar to +100 bars.

The log shows the following:

EURUSD: history synchronized from 2007.01.02 to 2020.06.30

EURUSD,H1: history cache allocated for 74955 bars and contains 6105 bars from 2008.01.02 10:00 to 2008.12.31 17:00

EURUSD,H1: history begins from 2008.01.02 10:00

The history is cached at 74955 bars, but 2008 contains the same 6105 bars. I.e. maximum copies bars for one year. It is not possible to copy more than 6105 bars. The maximum number of bars in the window is 100000, the whole history is visible in the chart, you can scroll through it, all the bars are present and everything is loaded. Literally, the mql_rates array is not copied.

 

Debugging not real data. Hanging on a line, pressing F11 or F10 repeatedly does not cause debugging to continue. pointer stays on one line and just blinks the screen.

Build 2715. Win10, 20H2 build 19042.746.


this is the state of memory

 
Ilyas:

Tell me, what is the potential danger of ZeroMemory, that an error occurs in this situation?

struct A
{
private:
  int i;
};

void OnStart()
{
  A a[1];
  
  ZeroMemory(a); // not allowed for objects with protected members or inheritance
}
 
Aleksey Mavrin:

Debugging not real data. Hanging on a line, pressing F11 or F10 repeatedly does not cause debugging to continue. pointer stays on one line and just blinks the screen.

Build 2715. Win10, 20H2 build 19042.746.


this is the state of the memory

Update to the latest beta 2747 please.

We are changing a lot of things in the debugger.

 
fxsaber:

Tell me, what is the potential danger of ZeroMemory, that an error occurs in this situation?

private/protected and const (in most of it) are purely for programmers, the compiler only helps to adhere to the restrictions imposed on the code

A classic example:
You're using someone else's library, under the bonnet is heavy code with links that unauthorized changes would cause a failure, so the library creator hides part of the object in private to prohibit unplanned changes.

 
Ilyas:

private/protected and const (for the most part) are for programmers only, the compiler only helps to adhere to the restrictions imposed on the code.

A classic example:
You use someone else's library, under the bonnet is heavy code with links that unauthorized changes would cause a failure, so the library creator hides part of the object in private to prohibit unplanned changes.

Got it, thanks for the detailed explanation!

 

It seems that real_volume field in MqlRates structure, although it has long type, is not capable to store values in range of all long values (according to documentation - 0x7FFFFFFFFFFFFFFF). For example, 0x4000000000000000A8 will be written to the field 0xA8. I'm talking about custom characters.

Is the actual range of valid values specified anywhere? Basically, there's no reason why it shouldn't work as a normal long - it looks like a bug.

PS. for tick_volume probably the same problem

Reason: