You have sensed the difference between a synchronous command and an asynchronous one.
Could you provide a list of asynchronous functions.
If I understand correctly, Object and Chart functions (which others?) are all asynchronous. Then it's not quite clear why ChartGet runs faster than ChartXY?
You have sensed the difference between a synchronous command and an asynchronous command.
Yeah...
But observations show that these functions are quite synchronous in their asynchrony. :)
Ok, I'll formulate my question differently for developers: Is there an opportunity (or desire) to change these asynchronous functions into synchronous ones?
Could you provide a list of asynchronous functions.
If I understand correctly, Object and Chart functions (which others?) are all asynchronous. Then it is not quite clear why ChartGet runs faster than ChartXY?
They're also terribly slow, it's just that the point of my "fast" algorithm is to calculate an opportunity not to call chart functions and do without them. And as soon as you "grab" chart in my example and start moving it left - right, all speed is lost because chart functions start to be applied due to occurrence of event
Hello, I started studying MQL5 fromhttps://www.mql5.com/ru/articles/100. I have launched the code and received error 4756. The error has not improved after looking through documentation. Ok, thought I will start with simple functions (Alert/Print...). One of the most important functions is OrderSend. I started searching through the forum/documentation on how to use OrderSend. I found this articlehttps://www.mql5.com/ru/docs/constants/tradingconstants/enum_trade_request_actions and found the code for opening a Buy position. I got error 4756 and retcode 10030. I understood that 10030 - it is the OrderSend property, but I have not understood how this property should be used (I looked at somebody else's code) and what it is mainly used for. Then I openedhttps://www.mql5.com/ru/docs/trading/ordersend, copied the code, launched it, everything is fine, it worked. But I still don't understand why error 4756 appears and how to get rid of it, as well as 10030.
Looked at the code between
voidOnTick(){
//--- объявление и инициализация запроса и результатаMqlTradeRequest request={0};
MqlTradeResult result={0};
//--- параметры запроса
request.action =TRADE_ACTION_DEAL; // тип торговой операции
request.symbol =Symbol(); // символ
request.volume =0.1; // объем в 0.1 лот
request.type =ORDER_TYPE_BUY; // тип ордера
request.price =SymbolInfoDouble(Symbol(),SYMBOL_ASK); // цена для открытия
request.deviation=5; // допустимое отклонение от цены
request.magic =EXPERT_MAGIC; // MagicNumber ордера//--- отправка запросаif(!OrderSend(request,result))
PrintFormat("OrderSend error %d",GetLastError()); // если отправить запрос не удалось, вывести код ошибкиAlert(GetLastError());
//--- информация об операцииPrintFormat("retcode=%u deal=%I64u order=%I64u",result.retcode,result.deal,result.order);
}
and this one.
uint SendRandomPendingOrder(longconst magic_number)
{
//--- готовим запрос MqlTradeRequest request={0};
request.action=TRADE_ACTION_PENDING; // установка отложенного ордера
request.magic=magic_number; // ORDER_MAGIC
request.symbol=_Symbol; // инструмент
request.volume=0.1; // объем в 0.1 лот
request.sl=0; // Stop Loss не указан
request.tp=0; // Take Profit не указан //--- сформируем тип ордера
request.type=GetRandomType(); // тип ордера //---сформируем цену для отложенного ордера
request.price=GetRandomPrice(request.type); // цена для открытия //--- отправим торговый приказ MqlTradeResult result={0};
OrderSend(request,result);
//--- выведем в лог ответ сервера Print(__FUNCTION__,":",result.comment);
if(result.retcode==10016) Print(result.bid,result.ask,result.price);
//--- вернем код ответа торгового сервера return result.retcode;
}
They seem almost identical to me, I don't see where these errors appear (4756 and 10030). Please point the finger and explain.
Hello! I started studying MQL5 fromhttps://www.mql5.com/ru/articles/100. I have launched the code and received error 4756. So I thought I would start from the simplest one (Alert/Print...). One of the most important functions is OrderSend. I started searching through the forum/documentation on how to use OrderSend. I found this articlehttps://www.mql5.com/ru/docs/constants/tradingconstants/enum_trade_request_actions and found the code for opening a Buy position. I got error 4756 and retcode 10030. I understood that 10030 - it is the OrderSend property, but I have not understood how this property should be used (I looked at somebody else's code) and what it is mainly used for. Then I openedhttps://www.mql5.com/ru/docs/trading/ordersend, copied the code, launched it, everything is fine, it worked. But I still don't understand why error 4756 appears and how to get rid of it, as well as 10030.
Looked at the code between
and this one.
They seem almost identical to me, I don't see where these errors appear (4756 and 10030). Please point the finger and explain
Use the CTrade trade class - that way you are guaranteed to make as few errors as possible.
Поиск выполняется с учетом морфологии и без учета регистра. Все буквы, независимо от того, как они введены, будут рассматриваться как строчные. По умолчанию наш поиск показывает страницы...
In the MT5 tester, the "Input field" object OBJ_EDIT does not allow to edit a value in it. Is it designed that way or is it a bug?
In terminals and MT4 tester it is editable, but in MT5 tester it is not, the value entered into it programmatically when creating the object disappears.
You have sensed the difference between a synchronous command and an asynchronous one.
Could you provide a list of asynchronous functions.
If I understand correctly, Object and Chart functions (which others?) are all asynchronous. Then it's not quite clear why ChartGet runs faster than ChartXY?
You have sensed the difference between a synchronous command and an asynchronous command.
Could you provide a list of asynchronous functions.
If I understand correctly, Object and Chart functions (which others?) are all asynchronous. Then it is not quite clear why ChartGet runs faster than ChartXY?
CHARTEVENT_CHART_CHANGEHello, I started studying MQL5 fromhttps://www.mql5.com/ru/articles/100. I have launched the code and received error 4756. The error has not improved after looking through documentation. Ok, thought I will start with simple functions (Alert/Print...). One of the most important functions is OrderSend. I started searching through the forum/documentation on how to use OrderSend. I found this articlehttps://www.mql5.com/ru/docs/constants/tradingconstants/enum_trade_request_actions and found the code for opening a Buy position. I got error 4756 and retcode 10030. I understood that 10030 - it is the OrderSend property, but I have not understood how this property should be used (I looked at somebody else's code) and what it is mainly used for. Then I openedhttps://www.mql5.com/ru/docs/trading/ordersend, copied the code, launched it, everything is fine, it worked.
But I still don't understand why error 4756 appears and how to get rid of it, as well as 10030.
Looked at the code between
and this one.
They seem almost identical to me, I don't see where these errors appear (4756 and 10030). Please point the finger and explain.
Hello! I started studying MQL5 fromhttps://www.mql5.com/ru/articles/100. I have launched the code and received error 4756. So I thought I would start from the simplest one (Alert/Print...). One of the most important functions is OrderSend. I started searching through the forum/documentation on how to use OrderSend. I found this articlehttps://www.mql5.com/ru/docs/constants/tradingconstants/enum_trade_request_actions and found the code for opening a Buy position. I got error 4756 and retcode 10030. I understood that 10030 - it is the OrderSend property, but I have not understood how this property should be used (I looked at somebody else's code) and what it is mainly used for. Then I openedhttps://www.mql5.com/ru/docs/trading/ordersend, copied the code, launched it, everything is fine, it worked.
But I still don't understand why error 4756 appears and how to get rid of it, as well as 10030.
Looked at the code between
and this one.
They seem almost identical to me, I don't see where these errors appear (4756 and 10030). Please point the finger and explain
Use the CTrade trade class - that way you are guaranteed to make as few errors as possible.
Example of sending a trade order to open Buy:
Use the CTrade trade class to ensure that you make as few mistakes as possible.
Example of sending a trade order to open a Buy:
CTrade - is it a universal class? That is, it can replace any other code?
CTrade - is it a universal class? So, is it possible to replace any other code with it?
CTrade is supplied with the terminal in theStandard Library->Trade Classes->CTrade.
They seem almost identical to me, I don't see where these errors appear (4756 and 10030). Please point the finger and explain
https://www.mql5.com/ru/search#!keyword=Unsupported%20filling%20mode
An example from kodobase
There are several ways to get code into ME
In the MT5 tester, the "Input field" object OBJ_EDIT does not allow to edit a value in it. Is it designed that way or is it a bug?
In terminals and MT4 tester it is editable, but in MT5 tester it is not, the value entered into it programmatically when creating the object disappears.