In the Defines.mqh file, set the EXPERT_IN_SUBWINDOW parameter to false:
it is clear, there is a function that works works works works works works (several days) and then takes and fails.
//+------------------------------------------------------------------+//| Checking and updating the number of the Expert Advisor window |//+------------------------------------------------------------------+void CWndEvents::CheckExpertSubwindowNumber(void)
{
//--- Exit if it is not an expertif(PROGRAM_TYPE!=PROGRAM_EXPERT)
return;
//--- Get the number of sub-windows on the graphint subwindows_total=(int)::ChartGetInteger(m_chart_id,CHART_WINDOWS_TOTAL);
//--- Exit if the number of subwindows and the number of indicators have not changedif(subwindows_total==m_subwindows_total)
return;
//--- Save the current number of subwindows
m_subwindows_total=subwindows_total;
//--- To check if there is an expert subwindowbool is_subwindow=false;
//--- Find the subwindow of the expert.for(int sw=0; sw<subwindows_total; sw++)
{
//--- Stop the loop if there is an expert subwindowif(is_subwindow)
break;
//--- How many indicators are in this window/subwindowint indicators_total=::ChartIndicatorsTotal(m_chart_id,sw);
//--- Let's go through all the indicators in the window for(int i=0; i<indicators_total; i++)
{
//--- Get the short name of the indicatorstring indicator_name=::ChartIndicatorName(m_chart_id,sw,i);
//--- If this is not an Expert subwindow, go to the next oneif(indicator_name!=m_subwindow_shortname)
continue;
//--- Note that the EA subwindow is
is_subwindow=true;
//--- If the subwindow number has changed, then // we need to save the new number in all elements of the main formif(sw!=m_subwin)
{
//--- Save subwindow number
m_subwin=sw;
//--- Let's save it also in all elements of the main form of the interfaceint elements_total=CWndContainer::ElementsTotal(0);
for(int e=0; e<elements_total; e++)
m_wnd[0].m_elements[e].SubwindowNumber(m_subwin);
}
//---break;
}
}
//--- If the Expert Advisor subwindow is not found, delete the Expert Advisorif(!is_subwindow)
{
::Print(__FUNCTION__," > Deleting an EA subwindow causes the EA to be deleted!");
//--- Removing the Expert Advisor from the chart
::ExpertRemove();
}
}
It is desirable to add to the form a mechanism for adding objects on the principle of "factory", as in Qt, or something similar and preferably with orientation relative to each other:
It is desirable to add to the form a mechanism for adding objects on the principle of "factory", as in Qt, or something similar and preferably with orientation relative to each other:
- right
- left
- top
- bottom
Please describe it in detail. I don't know how it is in Qt.
Now elements can be positioned relative to the form: right, left, top, bottom. Only the form can be a parent element. In the next version it will be possible to set any other element as a parent element. This will make element management and positioning even easier.
Describe it in more detail. I don't know how it is in Qt.
Now elements can be positioned relative to the form: right, left, top, bottom. Only the form can be a parent element. In the next version it will be possible to set any other element as a parent element. This will make element management and positioning even easier.
in Qt is a factory function:
QWidgetAction *createWidget();
and this is how the tests for creating widgets are done:
yes, but there is one problem, when used for a long time an error appears for no reason, deleting the EA subwindow causes the EA to be deleted
img
yes, but there is one problem, when used for a long time an error appears without any reason, deleting the EA subwindow leads to deleting the EA
In the Defines.mqh file, set the EXPERT_IN_SUBWINDOW parameter to false:
//---
For Expert Advisors whose graphical interface is located in the main window of the chart, the value of this parameter should be false.
In the Defines.mqh file, set the EXPERT_IN_SUBWINDOW parameter to false:
it is clear, there is a function that works works works works works works (several days) and then takes and fails.
it's clear, there is a function that works for a few days and then fails.
You are not using the latest version of the library or have made changes to it. There should be this condition at the beginning of this method:
//---
And you have:
You are not using the latest version of the library or have made edits to it. At the beginning of this method there should be this condition:
yes, I think that would be better)
version 10.2, so it has all the menu items I need and mt4 support.
are there any other critical changes since then that may affect the work?
...
have there been any other critical edits since then that might affect performance?
It is desirable to add to the form a mechanism for adding objects on the principle of "factory", as in Qt, or something similar and preferably with orientation relative to each other:
- right
- left
- top
- bottom
It is desirable to add to the form a mechanism for adding objects on the principle of "factory", as in Qt, or something similar and preferably with orientation relative to each other:
- right
- left
- top
- bottom
Please describe it in detail. I don't know how it is in Qt.
Now elements can be positioned relative to the form: right, left, top, bottom. Only the form can be a parent element. In the next version it will be possible to set any other element as a parent element. This will make element management and positioning even easier.
Describe it in more detail. I don't know how it is in Qt.
Now elements can be positioned relative to the form: right, left, top, bottom. Only the form can be a parent element. In the next version it will be possible to set any other element as a parent element. This will make element management and positioning even easier.
in Qt is a factory function:
and this is how the tests for creating widgets are done:
QWidget * widget() { static QWidget * inst = new QWidget; return inst; }and in general about QWidget here is all the information.
I don't quite get it here, is this positioning of the element relative to the borders and they can be placed both behind the form and inside the form?
For example, there is a form, we position an element relative to the left border of the form further to the left?