Can you tell me if resizing a dynamic array using the ArrayResize function should not decrease the amount of memory used by the EA? ( I check it using the MQLInfoInteger(MQL_MEMORY_USED) function
Here is the code:
Print("Первый ArrayResize вернул ",ArrayResize( TickTemp, 1000000, 0 ));
Print("Размер массива после ПЕРВОГО ArrayResize ",ArraySize( TickTemp )," Используем памяти. ",MQLInfoInteger(MQL_MEMORY_USED));
Print("Второй ArrayResize вернул ",ArrayResize( TickTemp, 500000, 0 ));
Print("Размер массива после ВТОРОГО ArrayResize ",ArraySize( TickTemp )," Используем памяти. ",MQLInfoInteger(MQL_MEMORY_USED));
Here is the result:
Первый ArrayResize вернул 1000000
Размер массива после ПЕРВОГО ArrayResize1000000 Используем памяти. 58
Второй ArrayResize вернул 500000
Размер массива после ВТОРОГО ArrayResize500000Используем памяти. 58
Frankly speaking, the result is a bit unexpected for me. I expected the program to use twice less memory in the second case.
Query the total number of indicators on the chart and search in the loop for the short indicator name.
Clarification. Not on the chart, but in general. To find out if there is an indicator in the "set". In the indicators folder.
Here, for example, I have my indicator A that uses another custom indicator B. If A does not get the handle of B when I start it, A will not start.
But if I start an owl using A, then A does not start and the owl does not close despite:
handle_A = iCustom(Symbol(),0,"my_used\\my_A7C");
if(handle_A == INVALID_HANDLE) // проверяем наличие хендла индикатора
{
Print("Не удалось получить хендл индикатора handle_A"); // если хендл не получен, то выводим сообщение в лог об ошибкеreturn(INIT_FAILED); // завершаем работу с ошибкой
}
else
{
Print("Получен хендл индикатора handle_A");
ChartIndicatorAdd(ChartID(),0,handle_A); // подключаем индикатор к графику
}
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
Tell me if this makes sense:
Tell me if this makes sense:
It's like arguing about the tastes of felt-tip pens.
Can you tell me if resizing a dynamic array using the ArrayResize function should not decrease the amount of memory used by the EA? ( I check it using the MQLInfoInteger(MQL_MEMORY_USED) function
Here is the code:
Here is the result:
Frankly speaking, the result is a bit unexpected for me. I expected the program to use twice less memory in the second case.
Is it possible to apply your own template for visualisation in the tester? Not a template with the name of the expert, but by default.
Open a new timetable. Sketch something on it. Right-click on the resulting chart - Save template ... -> tester.tpl
Now visual testing will run with the template you created.
Open a new timetable. Sketch something on it. Right-click on the resulting chart - Save template ... -> tester.tpl
Now visual testing will run with the template you created.
Thank you very much.
Another question. How can I programmatically check for a custom indicator without using iCustom ? Like FileIsExist.
Request the total number of indicators on the chart and search in the loop by short indicator name.
Query the total number of indicators on the chart and search in the loop for the short indicator name.
Clarification. Not on the chart, but in general. To find out if there is an indicator in the "set". In the indicators folder.
Here, for example, I have my indicator A that uses another custom indicator B. If A does not get the handle of B when I start it, A will not start.
But if I start an owl using A, then A does not start and the owl does not close despite:
Clarification. Not on the chart, but in general. To find out if the indicator is in the "set". In the indicators folder.
Can you also clarify what this is for?