Errors, bugs, questions - page 2784

 

printf(), double, scientific form. The number of decimal places I can set, the total length of the number I can set:

double d=12.3456789;
printf("d=%012.4E",d);

Result: d=001.2346E+01

Can I add zeros before a power? It should be like this: d=001.2346E+0001
 
sershi87:
As I said above after the update the terminal is very slow and hangs completely. Before the update there were no such problems and everything was working fine. I am aware of the Debian issue and fully agree with the fact it is a very stable disk. However, I think the need for a native version is long overdue and we need to pursue it.

I have an assumption that the slowdowns and crashes are caused by incorrect synchronization with the history server.
That is, for example, the setting of bars in the terminal window is 100000, for example I request 3000 bars from the code
but synchronization can fail and starts synchronizing with all available history on the server and pumping all the history from the server.
Due to this complete pumping of the history, the terminal hangs, until it downloads all the available server's history.
If you wait for this download, the terminal hangs up and starts working.

 
Roman:

I have an assumption that the slowdowns and crashes are caused by incorrect synchronization with the history server.
That is, for example, the setting of bars in the terminal window is 100000, for example I request 3000 bars from the code
but synchronization can fail and starts synchronizing with all available history on the server and pumping all the history from the server.
Due to this complete pumping of the history, the terminal hangs, until it downloads all the available server's history.
If you wait for this download, the terminal hangs up and starts working.

Braking starts only when you open the glass. You close the tumbler and everything is fine. But you can't work without it.
 

MT5 (build 2496) is VERY bad with custom charts, which are calculated using a user defined formula.
Permanently loads CPU - core load 100%.
Permanently loads disk - just writes there from 3 GB and more data.
Hogs terminal if any indicator with a buffer to be drawn in the main window (for example, Indicators/Trend/Adaptive Moving Average).


Steps to play:
MetaQuotes-Demo, Hedge account.
Set the maximum number of bars per chart: 1000

Create Custom Symbol: Ctrl+U ==> Create Custom Symbol:
- Symbol: NZDUSD_AUDUSD
- Formula: NZDUSD-AUDUSD
- Allow negative prices: True

Result - system starts to consume up to 3 GB on disk.
If I open a chart with a custom symbol, the load on the kernel will jump to 100%.
If I add an indicator (for example, Indicators/Trend/Adaptive Moving Average) and switch the TF, the Data Window will start convulsing, and in a couple of seconds, the terminal will not respond at all.


 
UPD. Also tens of thousands of monotonous entries are written to the log:
QG      0       18:18:12.209    Synthetic Symbol        NZDUSD_AUDUSD: there is data from 2020.06.19 to 2020.06.19 (4294967295 M1 bars from 1970.01.01 00:00 to 2020.06.19 23:54)
ML      0       18:18:12.209    Synthetic Symbol        NZDUSD_AUDUSD: M1 bars processing finished
LF      0       18:18:12.212    Synthetic Symbol        NZDUSD_AUDUSD: M1 bar 2020.06.19 23:54 updated
GO      0       18:18:12.212    Synthetic Symbol        NZDUSD_AUDUSD: there is data from 2020.06.19 to 2020.06.19 (4294967295 M1 bars from 1970.01.01 00:00 to 2020.06.19 23:54)
CD      0       18:18:12.212    Synthetic Symbol        NZDUSD_AUDUSD: M1 bars processing finished
QN      0       18:18:12.215    Synthetic Symbol        NZDUSD_AUDUSD: M1 bar 2020.06.19 23:54 updated
FG      0       18:18:12.215    Synthetic Symbol        NZDUSD_AUDUSD: there is data from 2020.06.19 to 2020.06.19 (4294967295 M1 bars from 1970.01.01 00:00 to 2020.06.19 23:54)
JL      0       18:18:12.215    Synthetic Symbol        NZDUSD_AUDUSD: M1 bars processing finished
FF      0       18:18:12.218    Synthetic Symbol        NZDUSD_AUDUSD: M1 bar 2020.06.19 23:54 updated
QO      0       18:18:12.218    Synthetic Symbol        NZDUSD_AUDUSD: there is data from 2020.06.19 to 2020.06.19 (4294967295 M1 bars from 1970.01.01 00:00 to 2020.06.19 23:54)
MD      0       18:18:12.218    Synthetic Symbol        NZDUSD_AUDUSD: M1 bars processing finished
LN      0       18:18:12.221    Synthetic Symbol        NZDUSD_AUDUSD: M1 bar 2020.06.19 23:54 updated
GG      0       18:18:12.221    Synthetic Symbol        NZDUSD_AUDUSD: there is data from 2020.06.19 to 2020.06.19 (4294967295 M1 bars from 1970.01.01 00:00 to 2020.06.19 23:54)
CL      0       18:18:12.221    Synthetic Symbol        NZDUSD_AUDUSD: M1 bars processing finished
NF      0       18:18:12.223    Synthetic Symbol        NZDUSD_AUDUSD: M1 bar 2020.06.19 23:54 updated
IO      0       18:18:12.223    Synthetic Symbol        NZDUSD_AUDUSD: there is data from 2020.06.19 to 2020.06.19 (4294967295 M1 bars from 1970.01.01 00:00 to 2020.06.19 23:54)
ED      0       18:18:12.223    Synthetic Symbol        NZDUSD_AUDUSD: M1 bars processing finished
RN      0       18:18:12.227    Synthetic Symbol        NZDUSD_AUDUSD: M1 bar 2020.06.19 23:54 updated

The total size of the log is approaching 1GB.


UPD... If after all calculations close terminal and reopen - all 3-8 GB of calculated data are successfully deleted and calculation starts again, using more modest amount of space - about 500 MB.
If I open chart with custom symbol after terminal restart - it turns empty for some reason, only 3 bars on M1 (the behaviour is something like flag "Allow negative prices" turned off).

 

Where do I send my bug reports to be addressed by the developers?

Since some release the compilation of template classes calling static functions is broken. Example:

Class Bar was compiled with both 64-bit and 32-bit MQL5. Now it generates an error. build 2485 05 Jun 2020

class Foo {
public:
    static void Start() {
        Print("Hallo!");
    }
};

template<typename T>
class Bar {
public:
    Bar() {
        T::Start();
    }
};

class Foz {
public:
    Foz() {
    }

    void Start() {
        Print("Hallo!");
    }
};

template<typename T>
class Baz {
public:
    Baz() {
        T t;
        t.Start();                                                                                                                                                                                          
    }
};

void OnStart() {
    Bar<Foo> var;
    Baz<Foz> vaz;
}

template_static_bug.mq5 : information: compiling 'template_static_bug.mq5'
template_static_bug.mq5(12,12) : error 256: 'Start' - undeclared identifier
Result: 1 errors, 0 warning
 
YanGillan:

Where do I send my bug reports to be addressed by the developers?
Since some release the compilation of template classes that call static functions is broken. Example:
The Bar class has compiled with both 64-bit and 32-bit MQL5. Now it generates an error. build 2485 05 Jun 2020.

You'll be somewhere around the 5th user to complain about this bug in one way or another...

 
Sergey Dzyublik:

You'll be about the 5th user to complain about this bug in one form or another...

Yeah, well, what to do? I know about workaround via base class, but it's a crutch. And it's not a good idea to patch all code.

Where can I download the previous builds? I haven't found them at my broker's or on mt5 site.

 
YanGillan:

Yeah, well, what to do? I know about the workaround through the base class, but it's a crutch. And it's not a good idea to patch the whole code.

Where can I download the previous builds? I haven`t found them at the broker`s site and on the mt5 site is not available.

 
YanGillan:

I know the workaround through the base class, but it's a crutch. And it's not a good idea to patch the whole code.

Do you mean this method or some other one?

template<typename T>
class GetClassType{
public:
   class type : public T{}; 
};


class Foo {
public:
    static void Start() {
        Print("Hallo!");
    }
};

template<typename T>
class Bar {
public:
    Bar() {
        GetClassType<T>::type::Start();
    }
};

void OnStart() {
    Bar<Foo> var;
}