Errors, bugs, questions - page 1866

 
Tester log
2017.04.21 09:06:58.342 RTS-6.17,M1: testing of Experts\fxsaber\Test2.ex5 from 2017.04.07 00:00 to 2017.04.08 00:00 started
2017.04.21 09:06:58.342 RTS-6.17 : real ticks begin from 2017.04.05 00:00:00

The actual tics start two days earlier than the initial test interval date. Is this normal?

 
fxsaber:
Tester log

The actual tics start two days earlier than the initial test interval date. Is this normal?

I assume that this was done intentionally - to be able to calculate the indicators that require a certain amount of history for their calculations?
 
Artyom Trishkin:
I can assume that this was done on purpose - to be able to calculate indicators that require a certain amount of history for their calculations?
Bars are sufficient for that. The tick history is available in any depth.
 
fxsaber:
Tester log

The actual tics start two days earlier than the initial test interval date. Is this normal?

Are you assuming that the history and ticks are uploaded to the tester again each time?

Erase the history cache in the tester folder, run the test and look at the log

 
stringo:

Are you assuming that the history and ticks are downloaded to the tester again each time?

Erase the history cache in the tester folder, run the test and look at the log

Forum on trading, automated trading systems and trading strategies testing

Peculiarities of mql5 language, subtleties and tricks

fxsaber, 2017.04.07 16:00

In the MT5 tester in "real ticks" mode, the basis of history is not real ticks, but M1 bars. This means that if real ticks do not correspond to bars, they are ignored and instead artificial ticks are generated which are obliged to correspond to bars.

At the same time, if CopyTicks is requested for more than 128K, then in the tester, they will be taken not from the cache (real ticks + generated), but from a database - the real ones. And get a mismatch in the tester between the history of ticks and what the tester was feeding.

This is a compilation of the responses received in the SD.
 
fxsaber:
It is a compilation of the answers received in the SR.
So?
 
stringo:
So?
Since CopyTicks is able to retrieve data from the shared database, why the extra two days?
 
fxsaber:
Since CopyTicks is able to retrieve data from the shared database, why the extra two days?

From what common base? The common base of all tester agents.

In general case there won't be any ticks before test start date. I suggested you to erase all the caches in the tester, run the test and see the logs.

 
stringo:

From what common base? The common database of all tester agents.

In general there will be no ticks there before the test start date. I suggested you erase all the caches in the tester, run the test and look at the logs.

Got it, thanks. Then I didn't fully understand what the SD meant.
 
From the SD.
Мы приняли решение отказаться от приведения неродственных структур

Now (1589) does not compile such simple things

Forum on trading, automated trading systems & strategy testing

How to quickly compare double and QNaN ?

fxsaber, 2016.10.11 10:57

double Nan(long bit_value)
  {
   struct L { long   x; } l; l.x=bit_value;
   struct D { double x; } d=(D)l;
   return(d.x);
  }

double QNaN   =Nan(0x7FF7000000000000);   // QNaN

And it became impossible to find out if double is equal to QNaN

double QNaN2 = (double)"nan";

void OnStart()
{
  Print(QNaN == QNaN);
}


Result

false


Because you made completely unworkable the TypeToBytes library, which was perfectly capable of comparing double with QNaN

Forum on trading, automated trading systems and strategy testing

How to quickly compare double and QNaN ?

fxsaber, 2016.10.11 11:14

#include <TypeToBytes.mqh>

void OnStart()
{
   if (_R(QNaN)==QNaN) {
      Alert("QNaN is QNaN");
   } else {
      Alert("Ooops");
   }   
}

Not to mention the huge number of other features of it put into practice - example.

Reason: