Errors, bugs, questions - page 311

 

Bug in new build, only possible on x64 systems (specifically windows 7, core i7 processor). There was no such a bug in previous build. This bug has the following meaning.

If I do not change the Expert Advisor source code significantly (for example, change only the value of some variable) and recompile after that, the test result remains the same.

I even got to the following :

In the void OnTick() function I insert return; :) compile, run, and the result is the same !!!! Although in general, the line should be.

The way out was either to delete *.ex5 file and compile again, or to write some rubbish to make the compiler kick, and then compile.

Tomorrow I will check if the same thing happens on x32 bit OS.

I also noticed that it takes too long to open new windows with charts on x64 and take too long to remove them!

And the terminal hangs with "no response" inscription for about 5 seconds.

 
bobsley:

Bug in new build, only possible on x64 systems (specifically windows 7, core i7 processor). There was no such a bug in previous build. This bug has the following meaning.

If I do not change the Expert Advisor source code significantly (for example, change only the value of some variable) and recompile after that, the test result remains the same.

I even got to the following :

In the void OnTick() function I insert return; :) compile, run, and the result is the same!!!! Although in general, the line should be.

The way out was either to delete *.ex5 file and compile again, or to write some rubbish to make the compiler kick, and then compile.

Tomorrow I will check if the same thing happens on x32 bit OS.

I also noticed that it takes too long to open new windows with charts on x64 and take too long to remove them!

And the terminal hangs with "no response" inscription for about 5 seconds.

Check this folder (Username Username\AppData\Roaming\MetaQuotes\Terminal\72CEBD0F7A5518983A10360D0E46A5B6\MQL5) maybe your EA will compile there
 
bobsley:

Bug in new build, only possible on x64 systems (specifically windows 7, core i7 processor). There was no such a bug in previous build. This bug has the following meaning.

If I do not change the Expert Advisor source code significantly (for example, change only the value of some variable) and recompile after that, the test result remains the same.

I even got to the following :

In the void OnTick() function I insert return; :) compile, run, and the result is the same!!!! Although in general, the line should be.

The way out was either to delete *.ex5 file and compile again, or to write some rubbish to make the compiler kick, and then compile.

Tomorrow I will check if the same thing happens on x32 bit OS.

...

I didn't catch this bug specially but I noticed a similar behavior on 32-bit. It is the error that sets up if you compile an expression you haven't finished, like a semicolon.
 
Im_hungry:
of course there is a history, but not all worms have a spread history!

1. We won't talk about everything, just this one, the developer's server - access.metatrader5.com:443 (well, I haven't met anyone with better history in MT5 at the moment).

Let's take my script, it is not very good, but nevertheless it is not finished. Let's run it on TF "1 week" and the number of bars 930.

We get the following result

2011.02.22 11:38:50     -   1:1993.05.09 00:00 open = 1.2368, high = 1.2368, low = 1.2084, close = 1.219, volume = 252, spread = 50
2011.02.22 11:38:50     -   0:1993.05.02 00:00 open = 1.2334, high = 1.2466, low = 1.2267, close = 1.2332, volume = 0, spread = 0
2011.02.22 11:38:50     -   Скопировано баров: 930

Apparently, spreads on weekly bars are from 1993.05.02 and the history of bars is even deeper. But this data may not be so deep if the Euro has officially existed since 1999 (although, God be with it, it is a different question).

2. now let us try to specify the depth of spread information on daily charts.

Let's take as a base the fact that there are 5 trading days in a week and try to find the beginning of history of spread data on daily charts (I will tell from the beginning the approximate number is 4630).

2011.02.22 11:56:06     -   2:1993.05.13 00:00 open = 1.2148, high = 1.2158, low = 1.2084, close = 1.2099, volume = 100, spread = 50
2011.02.22 11:56:06     -   1:1993.05.12 00:00 open = 1.2138, high = 1.2171, low = 1.2105, close = 1.2152, volume = 0, spread = 0
2011.02.22 11:56:06     -   0:1993.05.11 00:00 open = 1.2167, high = 1.2202, low = 1.2121, close = 1.2141, volume = 0, spread = 0
2011.02.22 11:56:06     -   Скопировано баров: 4630

Thus we can see that the history of the spread on the daily bars starts from 1993.05.13.

PS

I think further sort out by analogy (the oldest date on the smallest timeframe as I understand and will be that place which we are looking for)...

I will only point out that spreads on:

H12 available since 1993.05.13 (but bars there as I understood daily) - depth is roughly 7790 bars

H6 are available from 1993.05.13 (daily bars) - depth is roughly 14100 bars

 
sergey1294:
Check this folder (Username\AppData\Roaming\MetaQuotes\Terminal\72CEBD0F7A5518983A10360D0E46A5B6\MQL5) maybe your EA will compile there

I checked, of course, it's all blank. And why would it be, I've got the esperts in ..\Experts\Examples\

that's where their compilations appear.

Today I checked it on x32 OS at work. Before the upgrade it was fine, upgraded the terminal and immediately the same glitch!

 
 double op, sp;
     
     if ( ObjectGetDouble ( 0,"Open", OBJPROP_PRICE,0,op) &&  ObjectGetDouble ( 0,"Stop", OBJPROP_PRICE,0,sp ) ){
     
        if ( is40x_b0[0] > 0 && Tick.bid > op && Tick.bid < sp ){ <--------------- Дает предупреждение possible use of uninitialized variable 'sp'
         Sell(); 
        }
        
        if ( is40x_b1[0] > 0 && Tick.ask < op && Tick.ask > sp ){
         Buy(); 
        }

     }
 
Academic:


it has to be like this
 double op=0, sp=0;
 
sergey1294:
It has to be like this.
Why?
 
Academic:
Why ?

There's really nothing wrong with this.

The variables are reset during initialisation.

Here you can check it out.

int i;

printf("i=%d",i);

 
bobsley:

There's really nothing wrong with this.

The variables are reset during initialisation.

Here you can check it out.

int i;

printf("i=%d",i);

This warning should not be given, because a reference is passed to the ObjectGetDouble function and the if statement checks the truth returned by both calls, and hence only if both functions return true then these variables are handled, which means that both these variables cannot be set to the correct value.

Документация по MQL5: Графические объекты / ObjectGetDouble
Документация по MQL5: Графические объекты / ObjectGetDouble
  • www.mql5.com
Графические объекты / ObjectGetDouble - Документация по MQL5