Eh... I'd like to see a small example of how to order the second column in a 3x3 two-dimensional array. What should I write in the code after #include <Table.mqh>?
The following code outputs zeros. Where is the error?
#include <Table.mqh> void OnStart(){ ENUM_DATATYPE Types[3]; Types[0] = TYPE_DOUBLE; Types[1] = TYPE_DOUBLE; Types[2] = TYPE_DOUBLE; CTable Table; Table.FirstResize(Types); Table.SecondResize(3); Table.Set(0,0, 1); Table.Set(0,1, 4); Table.Set(0,2, 23); Table.Set(1,0, 2); Table.Set(1,1, 7); Table.Set(1,2, 48); Table.Set(2,0, 3); Table.Set(2,1, 1); Table.Set(2,2, 77); Table.SortTwoDimArray(1,0,Table.SecondSize()-1); string txt; for(int i=0; i<Table.SecondSize(); i++){ for(int j=0; j<Table.FirstSize(); j++){ double k; Table.Get(i,j,k); StringConcatenate(txt, txt, " ", DoubleToString(k)); } Print(txt); txt=""; } }//OnStart()
Nikolay, I have a question.
Is it possible to write a table from MT5 to Excel in this form?
I am interested in those 2 macro column names ("Absolute data" and "Relative data"), which are highlighted in colour. They unite 3 cells each.
Maybe I want a lot from MQL5 in terms of formatting excel cells. What if :-)))
Nikolay, I have a question.
Is it possible to write a table from MT5 to Excel in this form?
I am interested in those 2 macro column names ("Absolute data" and "Relative data"), which are highlighted in colour. They combine 3 cells each.
Maybe I want a lot from MQL5 in terms of formatting excel cells. But what if :-)))
What physical meaning do you put in the words "combine 3 cells" ?
In principle you can but without the top 2 rows, data types are summarised by columns, so that in one column to cram string and double will not work, but it can be done when printing. Or to refine the class so that it contains capital strings formatted separately from the table.
The easiest way is to create two tables and merge them.

- www.mql5.com

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
New article Electronic Tables in MQL5 is published:
The article describes a class of dynamic two-dimensional array that contains data of different types in its first dimension. Storing data in the form of a table is convenient for solving a wide range of problems of arrangement, storing and operation with bound information of different types. The source code of the class that implements the functionality of working with tables is attached to the article.
Author: Николай