Errors, bugs, questions - page 3174

 
Andreas Hoogendoorn # :

I am using the classes CGraphic and CCurve and something strange happens. I  am running two instances of the same EA on different currency-pairs. When I scroll a chart, the other chart is visible for one moment. Seems memory is messed up between the two charts. Restarting the terminal makes no difference. (The picture is an animated gif)


Can you post a minimal example? And, please specify the terminal and operating system data, something like this:

Forum on trading, automated trading systems and testing trading strategies

Very Glitchy MetaTrader

Vladimir Karputov, 2021.03.16 04:20

If you have a question, first of all you should show the first three lines from the 'Journal' tab


(select these lines, copy to the clipboard and paste into the message using the button Code). It should look like this:

2021.03.16 05:13:07.133 Terminal        MetaTrader 5 x64 build 3003 started for MetaQuotes Software Corp.
2021.03.16 05:13:07.134 Terminal        Windows 10 build 19042, Intel Core i7-9750H  @ 2.60GHz, 26 / 31 Gb memory, 842 / 947 Gb disk, IE 11, UAC, GMT+2
2021.03.16 05:13:07.134 Terminal        C:\Users\barab\AppData\Roaming\MetaQuotes\Terminal\D0E8209F77C8CF37AD8BF550E51FF075

 
Andreas Hoogendoorn #:

I am using the classes CGraphic and CCurve and something strange happens. I  am running two instances of the same EA on different currency-pairs. When I scroll a chart, the other chart is visible for one moment. Seems memory is messed up between the two charts. Restarting the terminal makes no difference. (The picture is an animated gif)


Ok I solved the problem although it is still a bug !!!

When using the CGraphic class it is obligated to use a unique name when creating a graphical resource.

The resources are not isolated as it should be. An EA from one chart can access the resource of another chart. 


2022.04.17 12:44:13.049 Terminal        MetaTrader 5 x64 build 3260 started for MetaQuotes Software Corp.
2022.04.17 12:44:13.050 Terminal        Windows 10 build 19044, 4 x Intel Core i5  750 @ 2.67GHz, 4 / 11 Gb memory, 4 / 124 Gb disk, UAC, GMT-3
2022.04.17 12:44:13.050 Terminal        C:\Users\andre\AppData\Roaming\MetaQuotes\Terminal\D0E8209F77C8CF37AD8BF550E51FF075

#include <Graphics\Graphic.mqh>
CGraphic          graphic;

graphic.Create(0, "test", 0, 0, 0, 1200, 400);

This examples fails.

graphic.Create(0, (string) MathRand(), 0, 0, 0, 1200, 400);
This example is OK.
 

I've already written about it. But it's really annoying.
Dear developers of the backend of this site, please fix it:
I keep getting notifications about new versions of paid products I never bought, sometimes several times a day:

I click on this link:

 
Andreas Hoogendoorn #:

I am using CGraphic and CCurve classes and something strange happens. I run two instances of the same EA on different currency pairs. When I scroll through one chart, the other chart becomes visible for an instant. The memory seems to get confused between the two charts. Restarting the terminal doesn't change anything. (The picture is an animated gif.)


When creating a graphical graph object, you need to add in the name e.g. the chart ID on which it will be drawn:

   CGraphic graphic;

   graphic.Create(0,"G"+(string)ChartId(),0,30,30,780,380);


Otherwise, the name of the graphical resource on both charts will be the same, and since graphical resources are global for the terminal, both programs will work with the same resource (i.e. draw to the same canvas).

 

Error : OrderCalcMargin return wrong value


OrderCalcMargin() sometimes return wrong value of required margin.

For example it work properly on many major forex pairs and on many other CFD, etc, it return correct value.


But, USDPLN or at PLATINUM, or at some other, it return absolutelly wrong value of required margin.

Requested ENUM_SYMBOL_CALC_MODE for EURUSD and USDPLN is the same(SYMBOL_CALC_MODE_FOREX), but if for EURUSD the function return correct value of margin required, for USDPLN it's wrong.

Why so?

 

Hi all, I hope I'm writing to the right place (but if anything, suggest a more relevant place).

I am talking about disappearance of allerts in MT5 (version 5.00 build 3260, Just2Trade).

The essence: if I add (or change) all the allocations and just reboot computer without closing window (Start Shutdown-Reboot),
all changes in all allocations disappear. And to save them, you need to remember to close terminal window with cross.

This is quite a cruel bug which needs to be fixed.

 
Lazar Buga #: Why so?

Your broker messed up. Talk to them.

 
Ilyas #:

When creating a graphical object, you must add in the name, for example, the ID of the chart on which it will be drawn:


Otherwise, the name of the graphical resource on both charts will be the same, and since graphical resources are global for the terminal, both programmes will work with the same resource (i.e. draw to the same canvas).

The name of the graphical object resource cannot exceed 63 characters. If you add a chart identifier to the name, there is not much room left for a sane readable name, unfortunately.

 
a18 #:

Hi all, I hope I'm writing to the right place (but if anything, suggest a more relevant place).

I am talking about disappearance of allerts in MT5 (version 5.00 build 3260, Just2Trade).

The essence: if I add (or change) all the allocations and just reboot computer without closing window (Start Shutdown-Reboot),
all changes in all allocations disappear. And to save them, you need to remember to close terminal window with cross.

It's quite a cruel bug to be fixed.

Fixed, will be in beta version.

 
Compilation error:
template<typename T>
struct A {
    T *t;
};
void OnStart()
{
    A<void> a; //Error: 'void' - expression of 'void' type is illegal
}
Reason: