Errors, bugs, questions - page 170

 

Hello. I have this problem, maybe it's a simple one, but I'm already exhausted.

I've been testing the EA on the history and I keep getting this error

12:17:41 TIC: loaded successfully
12:19:07 Test Generator: unmatched data error (low value 87.6580 at 2010.07.08 00:00 is not reached from the lowest timeframe, low price 87.6590 mismatches)
12:19:07 Test Generator: unmatched data error (volume limit 6029 at 2010.08.30 12:00 exceeded)
12:19:09 Test Generator: unmatched data error (high value 81.8880 at 2010.10.12 16:00 is not reached from the lowest timeframe, high price 81.8470 mismatches)
12:19:09 Test Generator: unmatched data error (low value 81.6610 at 2010.10.12 16:00 is not reached from the lowest timeframe, low price 81.7620 mismatches)
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Low volume, high volume, I don't know what values to change.

I changed MiniLotSize to 0.1 and 1 and 0.01 , also changed MaxLotSize and set it to 0 (broker settings) but it still does not trade,

Complete failure... I do not know what values to change... Help. I would really appreciate it...

 
A2dn:

Hello. I have this problem, maybe it's a simple one, but I'm already exhausted.

I've been testing the Expert Advisor on the history and it keeps popping up this error

12:17:41 TIC: loaded successfully
12:19:07 Test Generator: unmatched data error (low value 87.6580 at 2010.07.08 00:00 is not reached from the lowest timeframe, low price 87.6590 mismatches)
12:19:07 Test Generator: unmatched data error (volume limit 6029 at 2010.08.30 12:00 exceeded)
12:19:09 Test Generator: unmatched data error (high value 81.8880 at 2010.10.12 16:00 is not reached from the lowest timeframe, high price 81.8470 mismatches)
12:19:09 Test Generator: unmatched data error (low value 81.6610 at 2010.10.12 16:00 is not reached from the lowest timeframe, low price 81.7620 mismatches)
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Low volume, high volume, I don't know what values to change.

I changed MiniLotSize to 0.1 and 1 and 0.01 , also changed MaxLotSize and set it to 0 (broker settings) but it still does not trade,

Complete failure... I do not know what values to change... Help. I would really appreciate it...

These messages suggest inconsistency of historical data of different timeframes. Trading settings have nothing to do with it. Just re-download all data manually.

PS This question is related to MT4 and not to MQL5

 
stringo:

The ChartGetInteger(chartID,CHART_WIDTH_IN_PIXELS) function with maximized charts gives out window size before maximization if the screenshot is taken not from the current chart, which seems wrong.
 

I add the indicator to the chart with ChartIndicatorAdd() function. Now I can't figure out which function to remove it from the chart.

Документация по MQL5: Операции с графиками / ChartIndicatorAdd
Документация по MQL5: Операции с графиками / ChartIndicatorAdd
  • www.mql5.com
Операции с графиками / ChartIndicatorAdd - Документация по MQL5
 

do the developers plan to pass a parameter when calling (new) class constructor? it is problematic to work with dynamic arrays in classes.

the access specifier private , when inheriting, does not hide methods of the parent with specifier public, if I am not mistaken, it should not be so

ZS: correct the help - example: "MQL5 Reference / Language Fundamentals / Object Oriented Programming / Inheritance".

Пример:

//--- Базовый класс Фигура
class CShape{}
  {.........

and below

//--- производный класс Круг
class CCircle{} : public CShape        // после двоеточия указывается базовый класс,
  {.................

{} does not compile

Документация по MQL5: Основы языка / Переменные
Документация по MQL5: Основы языка / Переменные
  • www.mql5.com
Основы языка / Переменные - Документация по MQL5
 

To the developers.

PositionsTotal() and OrdersTotal() were found to be not working correctly in the initialisation block (at least in my opinion not correct).

What's the problem:

If initialisation is done after trading account change, _UninitReason = 6(REASON_ACCOUNT), then these functions return 0.

Although the positions and orders actually exist.

PS

I have allowed to trade on change of account and have some control on first start of expert.

Thus, the Expert Advisor sees that this is the first start on a new account, but it cannot determine whether the positions and orders exist or not in the initialization block.

At least, everything works fine in the block of tick processing and these functions return real data on the number of positions and orders.

It seems to work, but it works strangely, not even once in a while, but occasionally. Sometimes it works, sometimes it doesn't...


PPS

As I understood it is treated by falling asleep for a certain number of seconds, now I have to find out for how many seconds...
 
IgorM:

ZS: correct the help - example:"MQL5 Reference / Language Basics / Object Oriented Programming / Inheritance "

and below

{} does not compile.

Thanks for the post, it has been corrected.
 
Rosh:
Thanks for the post, it was corrected.

maybe I didn't fully explain in my previous post, but when working with class constructors it was usually like this:

http://www.delphisources.ru/pages/faq/faq_delphi_basics/Constructor.php.htmlor http://ru.wikipedia.or g/wiki/Конструктор_(programming)

I was unpleasantly surprised (MQL5 Reference / Language Fundamentals / Data Types / Structures and Classes ), at the restriction:

"Constructor has no return type (you can specify void type). In MQL5, constructors do not have any input parameters. Thus, each class can have only one constructor."

But using a standard constructor (i.e. not creating my own, my class uses dynamic memory allocation for arrays) the "Array out of Range" error occurs, which doesn't occur if the class type variable is declared - i.e. without using the new operator

//index_currency    aud,cad; // работает
index_currency    *aud,*cad; // не работает

int OnInit(){
   aud = new index_currency; cad = new index_currency; // неправильно работает
   aud.create(AUDX,100,PERIOD_M1,PRICE_CLOSE);
   cad.create(CADX,100,PERIOD_M1,PRICE_CLOSE);

there is no error if you use one pointer to a class instance, but there is no error if you declare it without * : index_currency aud,cad;

Delphi Constructor - Ключевое слово определяет процедуру Name конструктора для класса (справочник функций и процедур - Delphi Sources)
Delphi Constructor - Ключевое слово определяет процедуру Name конструктора для класса (справочник функций и процедур - Delphi Sources)
  • Andrey Simagin
  • www.delphisources.ru
1 type Class declaration     ...     Constructor Name; {Overload;}     ...   end; 2 type Class declaration     ...     Constructor Name(Arguments); {Overload;}     ...   end; Ключевое слово Constructor определяет процедуру Name конструктора для класса. При создании объекта, вы вызываете метод Constructor класса, а не объекта...
 
IgorM:

but using a standard constructor (i.e. not creating my own, my class uses dynamic memory allocation for arrays) I get the "Array out of Range" error, which does not occur if I declare a variable of class type - i.e. do not use the new operator

Read the articles The Order of Object Creation and Destruction in MQL5 and When to Use Pointers in MQL5.
 
IgorM:

there is no error if one pointer to class instance is used, if two or more, error occurs, no error if declared without *: index_currency aud,cad;

This shouldn't happen. Need the source code, better write to Service Desk.
Общайтесь с разработчиками через Сервисдеск!
Общайтесь с разработчиками через Сервисдеск!
  • www.mql5.com
Ваше сообщение сразу станет доступно нашим отделам тестирования, технической поддержки и разработчикам торговой платформы.
Reason: