Errors, bugs, questions - page 2422

 

bild 2009

The data received from the higher TFs in the online chart differs from the data received in the tester. This bug makes it impossible to correctly test Expert Advisors using data from higher TFs.

Reproduced minimal examples in the attachment, the script for the chart and the Expert Advisor for the tester writes data in a file for further comparison.

The screenshot of the two corresponding files shows significant differences:

bug

Files:
 
Andrey Dik:

bild 2009

The data received from higher TFs in the online chart differs from the data received in the tester. This bug makes it impossible to correctly test Expert Advisors using data from higher TFs.

Reproduced minimal examples in the attachment, the script for the chart and the Expert Advisor for the tester writes data in a file for further comparison.

The screenshot of the two corresponding files shows significant differences:

And, yes, this bug can be avoided by independently constructing higher TFs from the tick history, but it does not mean that you can ignore the incorrect operation of the functions i(o,h,l,c), iOpen, etc. in the tester.

 
Andrey Dik:

Have you run my codes? Don't like my tests, write your own tests, "correctly". When you've done a test for the bug you've voiced, report it here. Don't want to go to the trouble of checking? - My bug report is not for you, it's for developers.
I have been using MT5 since the beta testing of the platform, and it is not for you to lecture me.

There is no need to run your codes. You really don't understand the problem?

The script reads bar states for today. The Expert Advisor reads bar states as of current test time.

 
Slava:

There is no need to run your codes. Do you really not understand the problem?

The script reads the bar states as of today. The Expert Advisor reads bar states as of the current test time.

Slava, under the pressure of your authority I was doubtful about my actions... But only for a moment because I remembered that I was checking the moment you told me about, showing time of higher TFs together with their prices.

However, especially for you, I did it - now it outputs in one line everything you need to see the problem.... You do not want to say that iTime returns time correctly, but prices iOpen, iHigh, iLow, iClose - incorrect and this is normal?

Also, please pay special attention to the line:

int bar = iBarShift (NULL, tf, time, false);

in the relevant function, bar is an index in the array, which is obtained based on the time time, whether it is requested for today, yesterday, or the day before yesterday, the bar index is returned from the time requested in the function parameters.

The attached examples show the time of TFs, I strongly recommend that you still run them and make sure you have the problem yourself, rather than listening to random passersby, who do not bother to look into the problematic, look at the code and run it.

I do not understand the position of the administration... Wanted to show the problem, wanted the best, but it turns out as always...

Files:
 
Pavel Nikiforov:

I have encountered such a problem with the tester: the first time we press start all the process goes well, press immediately after that - nothing, no errors or test. The funny thing is that after waiting a few minutes, the tester works again, but again for one time.

If you run optimization on a number of runs it gives out:

EO 2 15:51:28.514 Core 1 genetic pass (0, 0) tested with error "some error after pass finished" at 0:00:00.052

PS 2 15:51:28.615 Core 1 genetic pass (0, 1) tested with error "task rejected by tester agent" in 0:00:00.000

Such magic only with one EA, probably the problem with it and new updates, but where to look for it is not clear, before everything was working (two months without touching it).

In general, I have figured it out. If anyone is interested, it was Sleep(5000); it doesn't matter how many milliseconds you can use one. In other words, Sleep() should not affect the testing and at the same time it "plays" generated ticks for the time specified. So far I haven't found any connection between Sleep() and a specific code of the Expert Advisor. This problem does not exist in other owls but still it hasn't happened before and if you encounter similar problems you should pay attention to it.

 
Andrey Dik:

Slava, under the pressure of your authority I was hesitating about my actions... But only for a moment, because I remembered that I was checking the point you mentioned by displaying also the time of older TFs along with their prices.

However, especially for you, I did it - now it outputs in one line everything you need to see the problem.... You do not want to say that iTime returns time correctly, but prices iOpen, iHigh, iLow, iClose - incorrect and this is normal?

Also, please pay special attention to the line:

in the relevant function, bar is an index in the array, which is obtained based on the time time, whether it is requested for today, yesterday, or the day before yesterday, the bar index is returned from the time requested in the function parameters.

The attached examples show the time of TFs, I strongly recommend that you still run them and make sure you have the problem yourself, rather than listening to random passersby, who do not bother to look into the problematic, look at the code and run it.

I do not understand the position of the administration... I wanted to show you there was a problem, I wanted the best but it turned out the same way it always happens...

I tried to use CopyRates () in Expert Advisor, the result was the same as in case of i(), time matches but prices don't.

 

In the following example, an error occurs when trying to copy an object with a constant field, despite the presence of the overloaded operator =. And the text of the error message does not even correspond to the cause of the error, because protected has nothing to do with it.

class A
{
};

class B
{
  A _data;
 public:
  const A*const Data;
  
  B() : Data(&_data) { }
  
  void operator=(const B &other) { _data= other._data; }
};

struct  C
{
  B b;
};

void OnInit()
{
  B b;
  b=b; // Так работает
  C c;
  c=c; // '=' - not allowed for objects with protected members or inheritance
}
 
How do I download code from Russian ME from English-language KB?
 
Andrey Dik:

Slava, under the pressure of your authority I was hesitating about my actions... But only for a moment, because I remembered that I was checking the point you mentioned by displaying also the time of older TFs along with their prices.

However, especially for you, I did it - now it outputs in one line everything you need to see the problem.... You do not want to say that iTime returns time correctly, but prices iOpen, iHigh, iLow, iClose - incorrect and this is normal?

Also, please pay special attention to the line:

in the relevant function, bar is an index in the array, which is obtained based on the time time, whether it is requested for today, yesterday, or the day before yesterday, the bar index is returned from the time requested in the function parameters.

The attached examples show the time of TFs, I strongly recommend that you still run them and make sure you have the problem yourself, rather than listening to random passersby, who do not bother to look into the problematic, look at the code and run it.

I do not understand the position of the administration... Wanted to show the problem, wanted the best, but it turns out as always...

No one is interested in that. The main thing is the Market and the signals work.
 

Good afternoon.

Build 2007. The problem is as follows. I am running in the strategy tester an EA on a futures (not glued) with visualization. I get the following result

Now I am removing the "Visualization" checkbox and get different results

I take other periods, including instruments. Both profit parameters and the number of deals are different. Moreover, I have found out after a detailed comparison of deals that some deals are impossible without visualization at the level of advisor's logic. So, the correct data can only be obtained using the visualization.

Comrades Forum members and developers, what is it and how to deal with it? It is expensive to test all the time with visualization on large periods, because the process takes longer than without the visualization.