Поиск выполняется с учетом морфологии и без учета регистра. Все буквы, независимо от того, как они введены, будут рассматриваться как строчные. По умолчанию наш поиск показывает страницы...
Yes, I remember that you are a macro genius. Thank you. Another thing is that the work is almost nowhere described. Can you advise a source that describes these intricacies? For C/C++, of course.
I use macros very rarely and at a simple level. Apparently I'm neglecting them undeservedly.
Can you advise a source that describes these subtleties?
I learned macros from the only example from MQ that was in the announcement of one of the MT5 builds. You entered # and ## and it was a good example. Can't find the link.
Learned macros from the only example from MQ that was in the announcement of one of the MT5 builds. There # and ## were entered and there was a good example. Can't find the link.
The codes themselves in the library file I prepared for publication are simple. At the same time the meaning is as you asked and approximately asSergey Dzyublik brought
P./S.: As it turned out with time, it was the simplest one which became the most applicable for me. With time I caught myself that without that included file - as something is missing / *when outputting some results: when constructing codes, functions work*/.
Learned macros from the only example from MQ that was in the announcement of one of the MT5 builds. There # and ## were entered and there was a good example. I cannot find the link.
MetaTrader 5 build 1010 platform update: New Signals, Market and Options
An update to the MetaTrader 5 platform will be published on Friday 31 October. The update will contain the following changes:
MetaTrader 5 Client Terminal build 1010
MQL5: Added macro parameter conversion to string and macro parameter concatenation. Below is an example where macro concatenation allows to organize automatic deletion of class instances.
//+------------------------------------------------------------------+//| MacroExample |//| Copyright 2014, MetaQuotes Software Corp. |//| http://www.metaquotes.net |//+------------------------------------------------------------------+#property script_show_inputs
inputbool InpSecond=true;
#define DEFCLASS(class_name) class class_name:public CBase{public:class_name(string name):CBase(name){}};
#define TOSTR(x) #x
#define AUTODEL(obj) CAutoDelete auto_##obj(obj)
#define NEWOBJ(type,ptr) do { ptr=new type(TOSTR(ptr)); \
Print("Create object '",TOSTR(type)," ",TOSTR(ptr),"' by macro NEWOBJ"); } \
while(0)
//+------------------------------------------------------------------+//| Базовый класс, необходим для автоудаления объектов |//+------------------------------------------------------------------+class CBase
{
protected:
string m_name;
public:
CBase(string name):m_name(name) { }
string Name(void) const{ return(m_name); }
};
//+------------------------------------------------------------------+//| Класс автоудаления объектов позволяет не следить за созданными |//| объектами. Он удаляет их в своем деструкторе |//+------------------------------------------------------------------+class CAutoDelete
{
CBase *m_obj;
public:
CAutoDelete(CBase *obj):m_obj(obj) { }
~CAutoDelete()
{
if(CheckPointer(m_obj)==POINTER_DYNAMIC)
{
Print("Delete object '",m_obj.Name(),"' by CAutoDelete class");
delete m_obj;
}
}
};
//+------------------------------------------------------------------+//| Объявим два новых класса CFoo и CBar |//+------------------------------------------------------------------+
DEFCLASS(CFoo);
DEFCLASS(CBar);
//+------------------------------------------------------------------+//| Основная функция скрипта |//+------------------------------------------------------------------+voidOnStart()
{
CFoo *foo;
//--- создадим объект класса CFoo
NEWOBJ(CFoo,foo);
//--- создадим экземпляр класса автоудаления объекта CFoo foo
AUTODEL(foo);
//---if(InpSecond)
{
CBar *bar;
//---
NEWOBJ(CBar,bar);
AUTODEL(bar);
}
//--- Удалять foo не нужно, он будет удален автоматически
}
//+------------------------------------------------------------------+
Hello, I was sent a MA indicator with all the levels I need. The problem is that when I hover my mouse over the indicator (each MA), it does not show the period of that MA. How to fix it? Constantly syntax error when changingIndicatorShortName("MASHKI =)"); Please help.
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.
Great! Interesting way to go about it.
Great! Interesting way to go about it.
https://www.mql5.com/ru/search#!keyword=TOSTRING
https://www.mql5.com/ru/search#!keyword=TOSTRING
Yes, I remember that you are a macro genius. Thank you. Another thing is that the work is almost nowhere described. Can you advise a source that describes these intricacies? For C/C++, of course.
I use macros very rarely and at a simple level. Apparently I'm neglecting them undeservedly.
Can you advise a source that describes these subtleties?
I learned macros from the only example from MQ that was in the announcement of one of the MT5 builds. You entered # and ## and it was a good example. Can't find the link.
Learned macros from the only example from MQ that was in the announcement of one of the MT5 builds. There # and ## were entered and there was a good example. Can't find the link.
I see, thanks again.
Coincidences happen... I just sent to CodeBase for publication the include file, which I compiled based on this discussion in 2015:https://www.mql5.com/ru/forum/63951/page2#comment_1908129
The codes themselves in the library file I prepared for publication are simple. At the same time the meaning is as you asked and approximately asSergey Dzyublik brought
P./S.: As it turned out with time, it was the simplest one which became the most applicable for me. With time I caught myself that without that included file - as something is missing / *when outputting some results: when constructing codes, functions work*/.
Learned macros from the only example from MQ that was in the announcement of one of the MT5 builds. There # and ## were entered and there was a good example. I cannot find the link.
Forum on trading, automated trading systems and strategy testing
Changes in MetaTrader 5 Client Terminal builds
MetaQuotes Software Corp., 2014.10.30 06:25
MetaTrader 5 build 1010 platform update: New Signals, Market and Options
An update to the MetaTrader 5 platform will be published on Friday 31 October. The update will contain the following changes:
MetaTrader 5 Client Terminal build 1010Thank you. I'll go the same way.
Judging by the time of publication (06:25) I stupidly overslept the news)))
Hello, I was sent a MA indicator with all the levels I need. The problem is that when I hover my mouse over the indicator (each MA), it does not show the period of that MA. How to fix it? Constantly syntax error when changingIndicatorShortName("MASHKI =)"); Please help.