I want to declare variables or arrays that will store dates, colors, strings.

On the mql4 shell, I write this way: datetime, color, string, but nothing happens here when specifying these data types?

  • @Alexander Petrov, I apologize, apparently, I misunderstood. - Lex Marchenko
  • one
    Because they put restrictions and created conditions under which I cannot put normal correct marks and sentences, the scheme made me choose these marks. I can say that the portal is very bad all sorts of restrictions and other nonsense. It's even difficult to write messages here. - Nexi99

1 answer 1

To work with the date, you can use std::chrono , strings - std::string . To do this, you need to connect: #include <chrono> and #include<string> To store color parameters, you can write your own structure or class that will store the data you need, depending on the task, either a numerical color representation, or as a string. Here you can see an example.

  • Handled the lines. I did not understand the color but I realized that it was a complex specificity. There are problems with dates. The library #include <chrono> takes, and this entry using std :: chrono; does not take. I read a little about it all, I thought I also needed a color structure for it, minutes, seconds. As the variable storing date will be declared. I need a variable to store the date like this 2001.10.19 00:00. - Nexi99
  • Read about the <chrono> library, you can create your own structure for storing time, but processing it without <chono> or <ctime> will be an extremely difficult process. - Lex Marchenko