Errors, bugs, questions - page 2827

 
fxsaber:

There is a text file, but the encoding is unknown beforehand. Accordingly, we need to determine which flag to open it with: FILE_ANSI or FILE_UNICODE.

Who has one, please share a bicycle on the subject.

If in doubt, open with FILE_ANSI flag. If there are 2 bytes BOM 0xFFFE at the beginning of this file, the FILE_ANSI flag will be ignored
 

Tester bugs.

I run the same indicator by real ticks (of course, in the visualizer). Just in case, I wrote the directive #property tester_everytick_calculate, but everything is the same without it.

Issue 1: depending on whether the indicator is run under the debugger or simply in the tester, different results are obtained in buffers. Under the debugger they are correct, without the debugger they are wrong. If I launch the debug-version from the tester I get the same results as under the debugger (i.e. correct). If I recompile without debugging, the tester shows wrong results again.

Problem 1 - my bug - I forgot to write static in one place, under debugger memory area under variable seems to be saved between events. Without debugger it's rubbish there.

Problem 2: when running under the debugger (from the editor) the indicator is drawn normally throughout the test, but when it finishes it disappears from the subwindow (the subwindow remains empty, buffers disappear in the data window ). If you run the debug version from the tester, this effect does not exist, that is, after the test is completed, the indicator remains in the subwindow.

I can provide MQ representatives with the source code in the personal message, but I don't think it is specific to the indicator.

 
Stanislav Korotky:

Tester bugs.

I run the same indicator by real ticks (of course, in the visualizer). Just in case, I wrote the directive #property tester_everytick_calculate, but everything is the same without it.

Issue 1: depending on whether the indicator is run under the debugger or simply in the tester, different results are obtained in buffers. Under the debugger they are correct, without the debugger they are wrong. If I launch the debug-version from the tester I get the same results as under the debugger (i.e. correct). If I recompile without debugging, the tester shows wrong results again.

Problem 2: when running under the debugger (from the editor) the indicator is normally drawn during the whole test, but when it finishes it disappears from the subwindow (the subwindow remains empty, buffers disappear in the data window ). If you run the debug version from the tester, this effect does not exist, that is, after the test is completed, the indicator remains in the subwindow.

I can provide the source code to MQ representatives in the personal area, but I don't think it is specific to the indicator.

It seems the tester developers can't get out from under the results of their efforts )

Now it's appropriate to answer such questions as "it's a feature", not a bug )

https://www.mql5.com/ru/forum/1111/page2826#comment_17836557

Don't get me wrong, the tester is a unique and cool thing, but it has plenty of clues

Ошибки, баги, вопросы
Ошибки, баги, вопросы
  • 2020.08.15
  • www.mql5.com
Общее обсуждение: Ошибки, баги, вопросы
 
Hi. In metatrader is it possible to switch assets faster than dragging the mouse cursor every time from the "market overview" tab?
 
Vladimir Makhnin:
Hi. In metatrader is it possible to switch assets faster than dragging the mouse cursor every time from the "market overview" tab?

Make an indicator and switch with the up/down keys on the keyboard

 

Cross-platform EAs are popular in the Marketplace. In fact, the mq4 and mq5 files are the same: the source code consists of one line.

#include "Cross-platform_code.mqh"

We have to multiply identical mq4/mq5 files just to explain to the compiler whether to create EX4 or EX5 file.


After recent splitting of compilers in ME, when mq4 doesn't compile in ME from MT5, it became strange to do this. After all ME from MT4 always knows to do EX4 and ME from MT5 always knows to do EX5. However, they still need to be explicit about it by creating the corresponding identical mq4/mq5 files.


How about introducing an mql-extension of files? You open it in ME_MT4 - it compiles to EX4, ME_MT5 compiles to EX5.


At the moment there are a stupid pile of identical files, differing only by the last digit in the extension.

 
fxsaber:

Cross-platform EAs are popular in the Marketplace. In fact, the mq4 and mq5 files are the same: the source code consists of one line.

We have to multiply identical mq4/mq5 files just to explain to the compiler whether to create EX4 or EX5 file.


After recent splitting of compilers in ME, when mq4 doesn't compile in ME from MT5, it became strange to do this. After all ME from MT4 always knows to do EX4 and ME from MT5 always knows to do EX5. However, they still need to be explicit about it by creating the corresponding identical mq4/mq5 files.


How about introducing an mql-extension of files? You open it in ME_MT4 - it compiles to EX4, ME_MT5 compiles to EX5.


At the moment we have a stupid pile of identical files, differing only by the last digit in the extension.

make header files, put everything else into mqh.

I gave up prefixes long ago.

 
Vladimir Pastushak:

make header files, put everything else in mqh

I gave up prefs a long time ago.

What does this have to do with what you wrote?

 
If I don't switch off mt5 process within 10-15 minutes, then windows hangs, it can work for twenty-four hours, sometimes it crashes after a couple of hours.
 
SEM:
Anybody experienced mt5 freeze, after freeze the "cached" partition in RAM starts growing sharply, then if mt5 process is not shut down within 10-15 minutes, windows will freeze, can work for 24 hours, sometimes it crashes after a couple of hours.

Look for memory leaks in EA, indicators.