AlexeyVik: Now they'll start explaining to you that the angle depends on the scaling of the graph and it can't be done... But if you take not the angle, but only the tangent of the angle, you can do it.
I wonder if it is possible to find out what it is and how it should be determined. I know that in geometry at school they taught the tangents and the catangents, but alas I don't remember) I asked Fresh on the forum, but I have not received a definite answer.
In short, the tangent of an angle in a right-angle triangle is the ratio of the opposing leg to the adjoining leg.
Translating this to the situation in the MT diagram, we get - the opposing leg will be equal to the points (in pct.) and the adjoining one in bars (also in pct.).
Example:
EURUSD opening 6.03 1.3732 opening 7:03 1.3860 total 128 pips. At M1 1440 bars tan = 128/1440=0.08889
This equation is basically used in the ObjectGetValueByShift() function
Please explain how to fit data from a table (*.csv) into a three-dimensional static array. The first column of the table contains the index for the first dimension of the array, The second column contains the index for the second dimension of the array, The third and further columns contain the values themselves for the third dimension of the array.
void AAA()
{
int Handle; // Файловый описательstring File_Name = "AAA.csv"; // Имя открываемого файлаstring str_1 = ""; // 1 Номер индекса по первому измерениюstring str_2 = ""; // 2 Номер индекса по второму измерениюstring str_3 = ""; // 3 Значениеstring str_4 = ""; // 4 Значениеstring str_5 = ""; // 5 Значение
Handle=FileOpen(File_Name, FILE_READ, ";"); // Открытие файлаwhile(FileIsEnding(Handle)==false) // До тех пор, пока файловый...
{ // ...указатель не в конце файла// Чтение данных из строки до файлового разделителя
str_1 = FileReadString(Handle); // 1 Номер индекса по первому измерению
str_2 = FileReadString(Handle); // 2 Номер индекса по второму измерению
str_3 = FileReadString(Handle); // 3 Значение
str_4 = FileReadString(Handle); // 4 Значение
str_5 = FileReadString(Handle); // 5 Значениеif(FileIsEnding(Handle)==true) // Файловый указатель в конце файлаbreak; // Выход из цикла чтения
????????????????????????????????????????????????????
}
FileClose(Handle); // Закрываем файлreturn; // Выход из функции
}
Leo59: Please explain how to put data from a table (*.csv) into a three-dimensional static array. The first column of the table has an index on the first dimension of the array, The second column is the index for the second dimension of the array, In the third and further columns - the values themselves according to the third dimension of the array.
If for analysis in Excel itself, the summary table.
Or show some of the data, it looks like we'll have to have auxiliary string arrays that will match the index-value.
.... it looks like we'll have to have auxiliary string arrays that will match the index-value.
void AAA()
{
int Handle; // Файловый описательstring File_Name = "AAA.csv"; // Имя открываемого файлаstring str_1 = ""; // 1 Номер индекса по первому измерениюstring str_2 = ""; // 2 Номер индекса по второму измерениюstring str_3 = ""; // 3 Значениеstring str_4 = ""; // 4 Значениеstring str_5 = ""; // 5 Значение
Handle=FileOpen(File_Name, FILE_READ, ";"); // Открытие файлаwhile(FileIsEnding(Handle)==false) // До тех пор, пока файловый...
{ // ...указатель не в конце файла// Чтение данных из строки до файлового разделителя
str_1 = FileReadString(Handle); // 1 Номер индекса по первому измерению
str_2 = FileReadString(Handle); // 2 Номер индекса по второму измерению
str_3 = FileReadString(Handle); // 3 Значение
str_4 = FileReadString(Handle); // 4 Значение
str_5 = FileReadString(Handle); // 5 Значениеif(FileIsEnding(Handle)==true) // Файловый указатель в конце файлаbreak; // Выход из цикла чтения// Завели строковый массив// Преобразование типов данных и запись в масссивArrayResize(Mas1, SizeMas1+1); // Увеличили размер массива Mas1
Mas1[SizeMas1][0] = StrToInteger(str_1); // 0 Номер индекса по первому измерению
Mas1[SizeMas1][1] = StrToInteger(str_2); // 1 Номер индекса по второму измерению
Mas1[SizeMas1][2] = StrToDouble(str_3); // 2 Значение
Mas1[SizeMas1][3] = StrToDouble(str_4); // 3 Значение
Mas1[SizeMas1][4] = StrToDouble(str_5); // 4 Значение
SizeMas1++; // Новый размер массива Mas1// Что дальше ????????????????????????????????????????????????????
}
FileClose(Handle); // Закрываем файлreturn; // Выход из функции
}
ObjectCreate("MyArrow",OBJ_ARROW_RIGHT_PRICE,0,Time[1],Open[1]) ; // created OBJ_ARROW_RIGHT_PRICE
Alert("objectTipe=", ObjectType("MyArrow"), "ARROW CODE=",ObjectGet("MyArrow",OBJPROP_ARROWCODE) ) ; // nightmare "objecType=" =22, didn't understand why not 36 as in the first line ?
Leo59: Please explain how to unpack data from table (*.csv) into three-dimensional static array. The first column of the table contains the index for the first dimension of the array, The second column contains the index for the second dimension of the array, The third and further columns contain the values themselves for the third dimension of the array.
Forget what you wrote next. Declare an array of appropriate type at global variable level arr[][][3] and define the second dimension by yourself.
void AAA()
{
int Handle; // Файловый описательstring File_Name = "AAA.csv"; // Имя открываемого файлаstring str_1 = ""; // 1 Номер индекса по первому измерениюstring str_2 = ""; // 2 Номер индекса по второму измерениюstring str_3 = ""; // 3 Значениеstring str_4 = ""; // 4 Значениеstring str_5 = ""; // 5 Значение
Handle=FileOpen(File_Name, FILE_READ, ";"); // Открытие файлаwhile(FileIsEnding(Handle)==false) // До тех пор, пока файловый...
{ // ...указатель не в конце файла// Чтение данных из строки до файлового разделителя
str_1 = FileReadString(Handle); // 1 Номер индекса по первому измерению
str_2 = FileReadString(Handle); // 2 Номер индекса по второму измерению
str_3 = FileReadString(Handle); // 3 Значение
str_4 = FileReadString(Handle); // 4 Значение
str_5 = FileReadString(Handle); // 5 Значение
// А здесь заполнение массива
arr[str_1][str_2][0] = str_3;
arr[str_1][str_2][1] = str_3;
arr[str_1][str_2][2] = str_4;
if(FileIsEnding(Handle)==true) // Файловый указатель в конце файлаbreak; // Выход из цикла чтения
????????????????????????????????????????????????????
}
FileClose(Handle); // Закрываем файлreturn; // Выход из функции
}
Well, it's like this. And you'll probably need to convert string indexes to integers.
Now they'll start explaining to you that the angle depends on the scaling of the graph and it can't be done...
But if you take not the angle, but only the tangent of the angle, you can do it.
I wonder if it is possible to find out what it is and how it should be determined. I know that in geometry at school they taught the tangents and the catangents, but alas I don't remember) I asked Fresh on the forum, but I have not received a definite answer.
If Yandex is banned, you can use Google.
In short, the tangent of an angle in a right-angle triangle is the ratio of the opposing leg to the adjoining leg.
Translating this to the situation in the MT diagram, we get - the opposing leg will be equal to the points (in pct.) and the adjoining one in bars (also in pct.).
Example:
EURUSD opening 6.03 1.3732 opening 7:03 1.3860 total 128 pips. At M1 1440 bars tan = 128/1440=0.08889
This equation is basically used in the ObjectGetValueByShift() function
The first column of the table contains the index for the first dimension of the array,
The second column contains the index for the second dimension of the array,
The third and further columns contain the values themselves for the third dimension of the array.
Please explain how to put data from a table (*.csv) into a three-dimensional static array.
The first column of the table has an index on the first dimension of the array,
The second column is the index for the second dimension of the array,
In the third and further columns - the values themselves according to the third dimension of the array.
If for analysis in Excel itself, the summary table.
Or show some of the data, it looks like we'll have to have auxiliary string arrays that will match the index-value.
.... it looks like we'll have to have auxiliary string arrays that will match the index-value.
How to delete all objects like OBJ_ARROW_RIGHT_PRICE?
Command ObjectsDeleteAll(OBJ_ARROW_RIGHT_PRICE) does not delete ! even after changing timeframe (to redraw the entire chart forcefully)
I wrote a simple script, in the comments it writes on the screen:
Alert("obj_arrow_right_price=",OBJ_ARROW_RIGHT_PRICE) ; // =36
ObjectCreate("MyArrow",OBJ_ARROW_RIGHT_PRICE,0,Time[1],Open[1]) ; // created OBJ_ARROW_RIGHT_PRICE
Alert("objectTipe=", ObjectType("MyArrow"), "ARROW CODE=",ObjectGet("MyArrow",OBJPROP_ARROWCODE) ) ; // nightmare "objecType=" =22, didn't understand why not 36 as in the first line ?
ResetLastError() ;
Alert("script delete arrow right price=",ObjectsDeleteAll(OBJ_ARROW_RIGHT_PRICE)," lastError=",GetLastError() ) ; // deleted objects =0, error code =0
I continue the experiment by writing: ObjectsDeleteAll(22) ; // deleted objects =0 again
How to delete all objects such as OBJ_ARROW_RIGHT_PRICE ?
Read the help once again:
ObjectsDeleteAll
Deletes all objects of a specified type and in a specified subwindow.
If the objects are in the main chart subwindow:
Read the help again:
ObjectsDeleteAll
Deletes all objects of the specified type and in the specified subwindow of the chart.
If objects are in the main graph subwindow:
Please explain how to unpack data from table (*.csv) into three-dimensional static array.
The first column of the table contains the index for the first dimension of the array,
The second column contains the index for the second dimension of the array,
The third and further columns contain the values themselves for the third dimension of the array.
Forget what you wrote next. Declare an array of appropriate type at global variable level arr[][][3] and define the second dimension by yourself.
Well, it's like this. And you'll probably need to convert string indexes to integers.