That is, events of button presses, for example, are not processed.
How can I fix it?
Thanks in advance!
I posted a working solution with buttons a couple of years ago. But Edit fields do not work in MT5 tester. Although you can add small +/- buttons next to the Edit field and edit through them. But there will be its own nuances.
ON_MOUSE_FOCUS_KILL does not seem to be used in any way. Nothing happens when you add it to Map. You can also comment out ON_MOUSE_FOCUS_KILL and the compiler will skip it.
Vasiliy Pushkaryov #: A couple of years ago I posted a working solution with buttons. But Edit fields do not work in MT5 tester. Although you can add small +/- buttons next to the Edit field and edit through them. But there will be its own nuances.
Good afternoon!
Thank you, I figured it out.
Now other problems - all these panels from the standard library,
are absolutely non-functional in MT4 tester in the test visualisation mode.
Is there any global solution to this problem, so that I don't have to dance with tambourine for each control?
Now other problems - all these panels are from the standard library,
are absolutely non-functional in the MT4 tester in the test visualisation mode.
Is there any global solution to this problem, so that I don't have to dance with tambourine for each control?
What do you mean non-functional? In my MT4 tester they fulfil their functions.
I gave an example when I inherited from CButton and added cMyButton::isButtonPushed() function to work with the tester.
I did the same for CEdit, CCheckBox and then I always use my inheritors. This is a one-time job.
In the TestPush file there was a sample function checkPushingButtons():
voidOnTick()
{
if(MQLInfoInteger(MQL_VISUAL_MODE)) ExtDialog.checkPushingButttons();
}
//+------------------------------------------------------------------------------------------------------------------+//| For the tester and OnTick. Let's check if the button (or object) is pressed//+------------------------------------------------------------------------------------------------------------------+void CAppWindowCorrectMinimization::checkPushingButttons()
{
if(m_button1.isButtonPushed()) print1();
if(m_button2.isButtonPushed()) print2();
}
Here is from my working code:
//+------------------------------------------------------------------------------------------------------------------+//| For the tester and OnTick. Let's check if the button (or object) is pressed//+------------------------------------------------------------------------------------------------------------------+void cInterface::checkPushingButttons()
{
if(btnOnOff.isButtonPushed()) OnClickOnOff();
if(btnLong.isButtonPushed()) OnClickLong();
if(btnShort.isButtonPushed()) OnClickShort();
if(btnCloseOff.isButtonPushed()) OnClickCloseOff();
if(btnProtocol.isButtonPushed()) OnClickProtocol();
if(btnOpposMA6.isButtonPushed()) OnClickOpposMA6();
if(editMA2plus.isEditChanged()) OnEditMA2plus();
if(editPunct.isEditChanged()) OnEditPuncture();
I.e. in the end the difference with working without a tester and in a tester comes down to adding a single function checkPushingButttons(), where we add a string to each control, and check via tick whether it's a push or an input.
Prepare templates, do it a couple of times, I think, then you will get used to it.
Hello Vladimir, first i also like to thank you for your great tutorial. I found a problem in using it in a template: Just put any of your applications into a template of an empty chart. After loading this template the application will come up twice like shown in the picture. Do you have any idea how to fix this?
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.
Hello!
Could you please tell me why your panel works fine on a real chart, but does not work in the strategy tester?
That is, events of button presses, for example, are not processed.
How can I fix it?
Thanks in advance!
That is, events of button presses, for example, are not processed.
How can I fix it?
Thanks in advance!
Hello!
I create a panel inherited from CDialog (or from CWndContainer, no difference).
If I create a panel in the main window of the chart, everything works - the panel is moved with the mouse and closed with the close button.
If I create a panel in a subwindow, then nothing works - the panel is immobile and does not react to the close button.
Question - how to make the panel react normally to events of the chart in the subwindow?
Hello, I managed to make my panel successfully. Thank you very much for your amazing tutorial.
A couple of years ago I posted a working solution with buttons. But Edit fields do not work in MT5 tester. Although you can add small +/- buttons next to the Edit field and edit through them. But there will be its own nuances.
Good afternoon!
Thank you, I figured it out.
Now other problems - all these panels from the standard library,
are absolutely non-functional in MT4 tester in the test visualisation mode.
Is there any global solution to this problem, so that I don't have to dance with tambourine for each control?
Good afternoon!
Thanks, got it sorted out.
Now other problems - all these panels are from the standard library,
are absolutely non-functional in the MT4 tester in the test visualisation mode.
Is there any global solution to this problem, so that I don't have to dance with tambourine for each control?
What do you mean non-functional? In my MT4 tester they fulfil their functions.
I gave an example when I inherited from CButton and added cMyButton::isButtonPushed() function to work with the tester.
I did the same for CEdit, CCheckBox and then I always use my inheritors. This is a one-time job.
In the TestPush file there was a sample function checkPushingButtons():
Here is from my working code:
I.e. in the end the difference with working without a tester and in a tester comes down to adding a single function checkPushingButttons(), where we add a string to each control, and check via tick whether it's a push or an input.
Prepare templates, do it a couple of times, I think, then you will get used to it.
Hello Vladimir,
first i also like to thank you for your great tutorial. I found a problem in using it in a template: Just put any of your applications into a template of an empty chart. After loading this template the application will come up twice like shown in the picture. Do you have any idea how to fix this?
Thank you in advance
Why is the panel/window cannot be dragged/moved past the chart boundaries?
What is the difference with Anatoli's easyfastgui library?