Errors, bugs, questions - page 1042

 
cat7:

The code causing the error.


And then how do I pass an array if my arrTimePrice type causes an error when passed to a function ?

I need a semicolon after declaring the structure:

//+------------------------------------------------------------------+
//| Структура массива |
//+------------------------------------------------------------------+
 struct arrTimePrice
  {
   datetime          time;
   double            price;

  };

//+------------------------------------------------------------------+
//| Функция |
//+------------------------------------------------------------------+

void someFunc (arrTimePrice & xyArr[])   // !!! здесь происходит ошибка
  {
      //--- что-то делаем
  }

//+------------------------------------------------------------------+
//| Сам скрипт |
//+------------------------------------------------------------------+

void OnStart()

  {

      // создаем массив

      arrTimePrice someArr [];

      ArrayResize(someArr, 10);

     // ... далее заполнили массив...

     // ...и передаем его в функцию...

      someFunc (someArr);

  }
In this form, your template compiles quite well. (And works.)
Документация по MQL5: Основы языка / Типы данных / Структуры и классы
Документация по MQL5: Основы языка / Типы данных / Структуры и классы
  • www.mql5.com
Основы языка / Типы данных / Структуры и классы - Документация по MQL5
 
MetaDriver:

You need a semicolon after declaring the structure:

In this form your template is quite compilable. (And works.)

You're right...

That's just how this stripped down version, the pattern works.

And in the full version for some reason the error continues: arrTimePrice -declaration without type

Off to find it....

 
MetaDriver:

A semicolon is needed after the structure declaration:

This way your template compiles quite well. (And it works.)

Got the error!

In the full version I declared the function later than the structure!

That's crazy, I thought it didn't matter in what order.

 
cat7:

Got it wrong!

In the full version I declared the function later than the structure!

What do you mean the other way around? :)


That's crazy, I thought it didn't matter in what order.

With global variables - no difference, with types there is a difference.

Sometimes it's unpleasant, e.g. if you connect all project inludes into one inluder, and then connect this general one to each, // it's very handy for work

then when trying to compile a generic (or main program) separately everything works, but compiling other inludes separately regularly runs into this error of yours.

;)

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

I don't have

#property indicator_height 400

it's not working, 10 to 800, no response. Does this thing work?

 

window

You can't see anything in it.

 
Zeleniy:


You can't see anything in it.

Press the button - properties - custom size
 
But it can be pulled out behind the terminal. Conclusion: is it technically possible to decouple windows from the terminal?
 

Another question for the developers

In the properties of the graph this list


ever learn to remember previously entered values?

 

I've looked in the help, but I can't find it. Is there no direct way to do it?

I can't find it, because it's inconvenient every time for a simple mathematical action to describe something like: if the number is greater than zero, it is equal to itself, and if it is less than zero, it is equal to itself multiplied by minus one.