Thanks))) Now I will know))) I indicated in which place an error occurs during compilation
double Price; // Цена выбранного ордераdouble Mas[]; //массив для упорядочивания всех ордеровfor(int i=0; i<OrdersTotal(); i++) // Цикл перебора ордер
{
if(OrderSelect(i,SELECT_BY_POS)) // Если есть следующий
{
Price=OrderOpenPrice(); //Заполняем массив ценами
Mas[i] = Price;
}
}
ArraySort (Mas,WHOLE_ARRAY,0,MODE_ASCEND); // Теперь цены открытия упорядочены по убываниюint Blizko1=ArrayBsearch(Mas,Bid,WHOLE_ARRAY,0,MODE_ASCEND); //Определен индекс ближайшего меньшего по значению елемента к текущей ценеdouble PriceBlizko1=Mas[Blizko1];
}
if (PriceBlizko1-Ask>=30*Point) //Если верхний ордер дальше чем 30 пунктов !!!! 'PriceBlizko1' - undeclared identifier!!!!!
{OrderSend(Symbol(),OP_BUY,LtsB,Ask,2,0,Bid+30*Point); //Открываем ордер БайAlert (GetLastError()); //Сообщение об ошибке
Strange because PriceBlizko1 is described in the line above
vikzip: Thank you))) I will now know))) I have indicated in what place gives an error at compilation Strange because PriceBlizko1 is described in the line above
It is described exactly in the line above. It needs to be defined globally so that it is available to all units, not just the local(current) one
2. Возвращает true или false в зависимости от успешности выполнения функции. В случае успеха значение свойства помещается в приемную переменную, передаваемую по ссылке последним параметром. [in] Модификатор указанного свойства. Для первого варианта по умолчанию значение модификатора равно 0. Большинство свойств не требуют модификатора...
Для разработки торговых систем в платформу встроен собственный язык программирования MetaQuotes Language 5 (MQL5), среда разработки MetaEditor и инструменты тестирования стратегий. Любую информацию о разработке торговых стратегий на языке MQL5 можно найти на официальном сайте MQL5.community. На этом же сайте в разделе Code Base могут быть...
In mql4, mql5 an array is always passed to a function by reference only (& == ampersand)
First - in formal parameters of a function, there is an ampersand, and it indicates that it's not the array itself that is passed into the function, but a reference to it. And then - inside the function - you are already working with the reference, which means that you don't have to specify it again.
The tilde (~) precedes the name of the class destructor - the constructor and destructor have the same name as the class itself, but the destructor has ~.
Read this article about when to use references and when to use pointers.
Use the button to insert code!
Strange because PriceBlizko1 is described in the line above
What, no one uses indicators from ClusterDelta?
Thank you))) I will now know))) I have indicated in what place gives an error at compilation
Strange because PriceBlizko1 is described in the line above
It is described exactly in the line above. It needs to be defined globally so that it is available to all units, not just the local(current) one
Doesn't anyone use indicators from ClusterDelta?
Read objects and take data from them:ObjectGetDouble
It is described exactly in the line above. It needs to be defined globally, so that it is available to all units, not just the local(current) one
Thank you)
Seems to have finished writing the EA, but an error pops up
')' - not all control paths return a value
What can it be related to. I tried to put return, the error changes
'return' - the function must return a value
Seems to have finished writing the EA, but an error pops up
')' - not all control paths return a value
What can it be related to. I tried putting return, the error changes
The 'return' - the function must return a value
Maybe the function mustreturn(0);
Maybe areturn(0) like this is needed;
AAAHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH !!!! Thanks!!!
AAAAAAAA HOORAY!!!! Thank you!!!
Why "thank you"? The function should return a value. And you always return zero. If it is supposed to return nothing, its type should be void.
In mql4, mql5 an array is always passed to a function by reference only (& == ampersand)
First - in formal parameters of a function, there is an ampersand, and it indicates that it's not the array itself that is passed into the function, but a reference to it. And then - inside the function - you are already working with the reference, which means that you don't have to specify it again.
The tilde (~) precedes the name of the class destructor - the constructor and destructor have the same name as the class itself, but the destructor has ~.
Read this article about when to use references and when to use pointers.
Although, you still need to read the basics.
Thank you!