I can't figure out what the optimiser is swearing at?
2019.04.1013:26:50.177 Core 8 genetic pass (13, 498) tested with error "critical runtime error 502 in OnTick function (array out of range, module Experts\xxxxxx.ex5, xxxxxx.mq5, line 384, col 73)" in 0:00:00.102
This is the buffer of the custom indicator, the handle of which was received correctly and the data are also copied correctly
handle_HMA7C = iCustom(Symbol(),0,"my_used\\my_HMA7C_121",period_HMA7C);
if(handle_HMA7C == INVALID_HANDLE) // проверяем наличие хендла индикатора
{
Print("Не удалось получить хендл индикатора handle_HMA7C"); // если хендл не получен, то выводим сообщение в лог об ошибкеreturn(INIT_FAILED); // завершаем работу с ошибкой
}
else
{
Print("Получен хендл индикатора handle_HMA7C");
ChartIndicatorAdd(ChartID(),0,handle_HMA7C); // подключаем индикатор к графику
}
.........................................
//+------------------------------------------------------------------+bool copyBuffers()
{
int nbars = 11;
ArrayFree(rates);
ArrayFree(buffer_HMA7C);
ResetLastError();
if(CopyRates(Symbol(),0,0,nbars,rates) < nbars) return(false);
if(CopyBuffer(handle_HMA7C,0,1,nbars,buffer_HMA7C) < nbars ) // копируем данные из индикаторного массива в массив buffer_HMA7C
{ // если не скопировалосьPrint("Не удалось скопировать данные из индикаторного буфера в buffer_HMA7C"); // то выводим сообщение об ошибкеPrint("LastError = "+string(GetLastError()));
return(false); // и выходим из функции
}
}
You have deleted a LOCAL order. What is the connection with magic being "1"? More precisely, what exactly is it that you don't like or are confused about?
You have deleted a LOCAL order. What is the connection with magic being "1"? More precisely, what exactly is it that you don't like or are confused about?
Торговая деятельность в платформе связана с формированием и отсылкой рыночных и отложенных ордеров для исполнения брокером, а также с управлением текущими позициями путем их модификации или закрытия. Платформа позволяет удобно просматривать торговую историю на счете, настраивать оповещения о событиях на рынке и многое другое. Открытие позиций...
The point doesn't change - you are trying to delete a pending orderwith a ticket "0" on every tick.
And who says that you have a pending order with a "0" tick on every tick? Have you checked how many pending orders there are? And how do you know that ....?
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.
I can't figure out what the optimiser is swearing at?
The code it is blaming
This is the buffer of the custom indicator, the handle of which was received correctly and the data are also copied correctly
Hello! What is MQL5InfoString or MQL5InfoInteger? Where can I read about it? I could not find it in the Help!
How did you search that you couldn't find it?
It's strange, in the editor I press F1 against this function and it doesn't show anything... thank you!
After deleting the order magik=1. What to do?
After deleting the order magic=1. What to do?
You have deleted a LOCAL order. What is the connection with magic being "1"? More precisely, what exactly is it that you don't like or are confused about?
You have deleted a LOCAL order. What is the connection with magic being "1"? More precisely, what exactly is it that you don't like or are confused about?
Keeps deleting non-existent orders
According to your code, this is exactly what will happen: you force a command on each tick to delete a REPLACEMENT order with a tick "0".
In your code, this is exactly what will happen: you will forcibly issue a command on each tick to delete a LOCKED order with a tick "0".
no, that's not true, only if magik=1
no it's not, only if magik=1
The point doesn't change - you are trying to delete a pending order with a ticket "0" on every tick.
And who says that you have a pending order with a "0" tick on every tick? Have you checked how many pending orders there are? And how do you know that ....?