Questions from Beginners MQL5 MT5 MetaTrader 5 - page 1174
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
The second and subsequent dimensions of an array cannot be dynamic. Therefore, as an array is declared, for example, int Mas[][7]; it must be taken by MyFun(int &Mas[][7])
Thanks. I didn't have the brains for it.
Hello programmers. Once again I'm asking for your help. There is a standard indicator from which I want to get a single value. I have connected the indicator and copied an array of its values into the buffer double buf_atr[] Printed to the log ArrayPrint(buf_atr) shows these values:
0.00032 0.00037 0.00039 0.00039 0.00041 0.00039 0.00037 0.00036 0.00034 0.00035 0.00035 0.00035 0.00034 0.00030
HOW DO I APPLY TO THE MASSIVE KEY WHICH HAS THE VALUE 0.00030? It turns out that this value is not on the current candle 0 and the previous is already formed 1
It seems to work, but how to access the cell array to further work with it I do not know ;(
Hello programmers. Once again I'm asking for your help. There is a standard indicator from which I want to get a single value. I have connected the indicator and copied an array of its values into the buffer double buf_atr[] Printed to the log ArrayPrint(buf_atr) shows these values:
0.00032 0.00037 0.00039 0.00039 0.00041 0.00039 0.00037 0.00036 0.00034 0.00035 0.00035 0.00035 0.00034 0.00030
HOW DO I APPLY TO THE MASSIVE KEY WHICH HAS THE VALUE 0.00030? It turns out that this value is not on the current candle 0 and the previous has already formed 1
It seems to work, but how to access the cell array to further work with it I do not know ;(
IT WORKS YAY!!! I need to turn tobuf_atr[buf_size-1] I HAVE Tried EV ERYTHING. Many thanks to youVitaly Muzichenko.
Is mql styling mandatory, array reference ?
Dialog.mqh.
CreatedCAppDialogPTR class - descendant of CAppDialog - advise how to properly override m_background, m_caption ... from CDialog class to access them from my class?
Dialog.mqh.
You can't. These objects are locked from direct modification in your class, as indicated by the private keyword. You cannot work with them directly. Use methods of CDialog class which work with these fields.
You can't. These objects are locked from direct modification in your class, as indicated by the private keyword. You cannot work with them directly. Use methods of your CDialog class that work with these fields.
Let's assume.
A created instance of theCAppDialogPTR classhas controls ( CWndContainerclass-> CWnd* Control(const int ind) const { return(dynamic_cast<CWnd *>(m_controls.At(ind)); }) through whichm_background, m_caption can be accessed
1) What is the syntax for accessing (referring to memory) the created object?
"CAppDialog::Create(chart,name,subwin,x1,y1,x2,y2);"
Suppose.
A created instance of theCAppDialogPTR classhas controls ( CWndContainerclass -> CWnd* Control(const int ind) const { return(dynamic_cast<CWnd *>(m_controls.At(ind)); } ) through whichm_background, m_caption can be accessed
1) What is the syntax for accessing (referring to memory) the created object?
You still can't access the contrails addressably through the m_controls collection, because it's also closed, besides you don't know which index corresponds to which particular control. The idea is that CDialog locks access to the elements it consists of, but allows you to manage its main properties consistently. For example we can't access m_caption directly but can change its text using Caption(const string text) method.
What you want is hack in essence. In principle when using any MQ tool you want to make this or that hack, so you are not alone. Probably the easiest way is to copy the library to a separate directory and move the private section to protected. This is crude and dumb, but it will work. Other options are unlikely - too hard code.
You won't be able to access counterparts via m_controls collection anyway, because it is also closed, besides, you don't know which index corresponds to which control. The idea is that CDialog locks access to the elements it consists of, but allows you to manage its main properties consistently. For example we can't access m_caption directly but can change its text using Caption(const string text) method.
What you want is hack in essence. In principle when using any MQ tool you want to make this or that hack, so you are not alone. Probably the easiest way is to copy the library to a separate directory and move the private section to protected. This is crude and dumb, but it will work. The other options are unlikely to work because the code is too hard.
Modifying MQ source code and pulling methods to public is clearly not our method :).
But I can refer to Caption properties after declaration of global variable panel:
But not only it does not look nice, but this code behind theCAppDialogPTR class. How can I do the same inside ofCAppDialogPTRclass?