I use this to disable automatic minimization on chart change:
void OnChartEvent(const int id, // event ID const long& lparam, // event parameter of the long type const double& dparam, // event parameter of the double type const string& sparam) // event parameter of the string type { //--- disable automatic minimization on chart change. if(id==CHARTEVENT_CHART_CHANGE) if(ChartGetInteger(0,CHART_HEIGHT_IN_PIXELS)<ExtDialog.Height()) return; ExtDialog.ChartEvent(id,lparam,dparam,sparam); }

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
There has been numerous forum topics over the years regarding panels created using CAppDialog being minimised when the user switches to another chart.
Having intermittently encountered the issue I have discovered the reason as follows:
Dialog.mqh chart events processing there is a function that checks if the panel is greater in height than the window height in pixels, if true it will automatically minimise the panel upon event CHART_EVENT_CHANGE
The problem is this happens with panels that are smaller than the window height and are already maximised and being used on the chart with plenty of space.
To make the check the function calls m_chart.HeightInPixels(m_subwin) located in the Chart.mqh this returns the height of chart in pixels, BUT it is wrong no matter what the chart heigh, it is returning the value 752 so if the panel is greater in height than 752 it gets minimised.
I am unable to establish where it gets the 752 from even with all my charts docked and at the same size it still returns 752 which suggests the function that it uses ChartGetInteger(m_chart_id,CHART_HEIGHT_IN_PIXELS,num)) does not work correctly at the time of switching chart
I have checked that the chart id being sent is 0 and the subwindow is 0 I have tried overiding the chart id to the value returned from ChartID() but the result is the same always 752 returned no matter the size of the chart window
code snippets shown, can we get MQ developers to look at this?