Errors, bugs, questions - page 2708

 

I suggest adding specifics to the automatic validation of products in the marketplace. In addition to general errors reported by the validator, the context of the test being performed and the logs are strongly requested. In particular, I haven't been able to update one indicator for a couple of years now because of the "tester takes too long time" error. The first version was uploaded under "human" moderation and had no complaints. The autovalidator's criteria for issuing this error is totally unclear.

Here is a specific question: how many ticks in what amount of time should the product provide on what hardware so that "tester takes too long" would not appear?

The indicator is intended for processing ticks by the MapReduce algorithm, integer calculations are used, so there is nothing to compress, unless you throw out the algorithm itself. The profiler was used, a trotlining was added to recalculate the array of new ticks with a given period. To no avail.

On my computer the year is tested in a few minutes. What is actually going on in the autovalidator and why it is slowing down is impossible to know at the moment.

The lack of proper product support is a problem for both users and MQ - it affects implementation.

 

Is it supposed to be like this?

class cA
  {
public:
   int               Add(int i1,int i2)
     {
      return i1+i2;
     };
                     cA()
     {
      Print("+++");
     };
                    ~cA()
     {
      Print("---");
     };
  };

void OnStart()
  {
   cA a=cA();
  }

Log:

2020.04.17 18:39:32.996 test3 (EURUSD,M1)       +++
2020.04.17 18:39:32.996 test3 (EURUSD,M1)       +++
2020.04.17 18:39:32.996 test3 (EURUSD,M1)       ---
2020.04.17 18:39:32.996 test3 (EURUSD,M1)       ---

Double constructor and destructor call, as if two objects are created and deleted. Everything is fine when using new and delete.

Build 2380.

 
Aliaksandr Hryshyn:

as if two objects were being created and deleted.

That's the way it is.

 
fxsaber:

It is.

And my object is created second:

class cA
  {
public:
   int               my_i;
   int               Add(int i1,int i2)
     {
      return i1+i2;
     };
                     cA()
     {
      static int i=0;
      my_i=i;
      i++;
      Print("+++");
     };
                    ~cA()
     {
      Print("---");
     };
  };

void OnStart()
  {
   cA a=cA();
   Print(a.my_i);
  }
2020.04.17 18:47:34.771 test3 (EURUSD,M1)       +++
2020.04.17 18:47:34.771 test3 (EURUSD,M1)       +++
2020.04.17 18:47:34.771 test3 (EURUSD,M1)       ---
2020.04.17 18:47:34.771 test3 (EURUSD,M1)       1
2020.04.17 18:47:34.771 test3 (EURUSD,M1)       ---
 
Aliaksandr Hryshyn:

And my object is created second:

First object.

cA a=cA();


Second object.

cA a=cA();
 

Then that's the way it should be:

cA a;
Print(a.my_i);
 
Stanislav Korotky:

On my computer, a year is tested in a few minutes. What is actually going on in the autovalidator and why it is slowing down is impossible to know at the moment.

A year in a few minutes is a lot. Hardly anyone would have waited (if it was an EA).
Is it visually drawing normally? Is it possible to understand anything by observing the tester?

Add a plug for the marketplace - speeding up calculations to the detriment of accuracy (if possible), or drawing "something similar" altogether. The product is clearly specific, and whoever needs it will be able to switch the right parameter.

 
Andrey Khatimlianskii:

A year in a few minutes is a lot. Hardly anyone would have waited (if it was an EA).
Is it visually drawing ok? Is it possible to understand something by observing the tester?

Add a stub for the marketplace - speeding up calculations at the expense of accuracy (if possible), or drawing 'something similar' altogether. The product is clearly specific, and whoever needs it will be able to switch the right parameter.

In my opinion, a year in a few minutes in potic mode is fine. There used to be a limit of 15-20 minutes on championships (can't remember exactly). A stall has already been added (time-lapse trottling). You can skip ticks, but then the point of the product disappears. Specificity is a relative concept: I know that many work in ticking mode (and they all have an add-on with price and/or volume check). And all the more important, to have more precise criteria, plus feedback from the autovalidator (if we say "your terminal is not working" in the forum, we MQ what do we ask? - Give logs and conditions for reproduction; here we get a message that our product doesn't work, but no specifics). And it is more correct to take the specifics of the product into account. After all, the total runtime of the product is not only the time of MQL-code, but the terminal itself. There are more expensive calls such as CopyTicksRange. These overheads are now taken into account as defects in MQL-product.

PS. In the case of indicators it seems that it is not the operation by ticks that is more critical, but the number of buffers (there are many of them because of the peculiarities of the task). I will try to limit the number of them for the tester (it makes the product more complicated and fraught with errors, as well as other flags imposed by external conditions, such as trotting). This once again proves the need for the autovalidator to vary the performance score on several parameters.

PPS. I'm requesting ticks for the last day, and the tester is loading them for 2 years - and that takes time too.

 
Stanislav Korotky:

PPS. I'm requesting ticks for the last day, and the tester is loading them for 2 years

For some reason this behaviour is official.

I suppose that they should not generate bars at all for Expert Advisors which do not use indicators or address bars etc.

For example, if there is only SymbolInfoTick - don't generate bars, don't store history for copyticks.


Not at all clear on this barophilia for a serious algotrading tool like Tester. But since even MO aesthetes keep munching on this cactus, there's probably no understanding.

 

Why in MQL I can't call protected constructor from my factory method?

class A1
{
  protected:
    A1(const bool x = false){}
  public:  
    static A1 *creator()
    {
      return new A1(true);
    }
};

void OnStart()
{
  A1 *a = A1::creator();
}

The code gives a compilation error "'A1::A1' - cannot access protected member function", and it specifies the line where the class description starts, not where the constructor is called (i.e. I have to manually search for where the problem is).

But the point is there should be no error at all. C++ compiles without any problems.

Reason: