i was in effort to modify it, but failed. the complex MT5 .mqh files frustrated me, so many variables and objects!
Yes it involves some work the best way is to rename the loop variables for example when you get a warning about variable i then you can rename i to i1 in that loop and in the next loop i2 and i3 and so on.
Also it's not needed to do the entire library you can just take the element you need and convert only that because the articles deal with a lot of items and objects.
A panel that has several comboboxes and number entry fields. There is one main combo box, on which the other fields depend
How it should work:
when the value of the main combobox changes, the other input fields and comboboxes: something is hidden, something appears, something changes its location (X,Y)
What ways I have tried:
1) - when re-selecting a value in the main combo box - all unnecessary elements are deleted (Delete()) and then re-created (Create...()). The result - when you click on an element of the redrawn combobox, an array out of range occurs when accessing the array of form elements. I tried to "stiffen" the error and added a check for the array size in the error location (so that the loop is not forced to go beyond the array), now when it gets here, the form just "hangs".
2) - tried method 1), but at the same time added to WndContainer function, which is written in this thread, at the beginning of "DeleteElementsFromArray" - the situation has not changed.
3) - I tried to draw all elements with the same X,Y values (all elements in one point), then immediately hide them (Hide()), then if necessary change their X,Y (XGap(...), YGap(...)) and draw them (Update(true); Show()). - Here is another problem - some of the elements are not hidden after hiding, and the other part - loses its LabelText (it is just visually absent).
added to WndContainer the function, which is written in this thread, at the beginning of "DeleteElementsFromArray" - the situation has not changed
I wrote that for simple elements. Combobox is not simple ) The current version should delete complex ones, but I haven't tested it yet, I think, and I need to change a lot of things there).
And for hiding I added m_is_hiden property to elements and in CWndEvents::Show(const uint window_index); elements with true are skipped.
Developing business code that makes use of graphical elements panels is one thing and this library is very helpful. However, when it comes to low performance or bugs that need to be reproduced,
That said, trying to fix things in a live chart is extremly tedious (e.g. waiting until certain conditions are met so I can click on graphical elements... gah)
It would be beyond helpful if we could properly test stuff within the ST!
1. Did the MetaTrader dev team talk somewhere on the forum about it why void OnChartEvent is not being triggered in the ST?
Early on it was developed in MQL4 and MQL5 but the last few examples are for MQL5.
This does not mean that it can not be made to work in MQL4.
The code usually needs a few small bits of adjustments.
i was in effort to modify it, but failed. the complex MT5 .mqh files frustrated me, so many variables and objects!
i was in effort to modify it, but failed. the complex MT5 .mqh files frustrated me, so many variables and objects!
Yes it involves some work the best way is to rename the loop variables for example when you get a warning about variable i then you can rename i to i1 in that loop and in the next loop i2 and i3 and so on.
Also it's not needed to do the entire library you can just take the element you need and convert only that because the articles deal with a lot of items and objects.
I wrote that for simple elements. Combobox is not simple ) The current version should delete complex ones, but I haven't tested it yet, I think, and I need to change a lot of things there).
And for hiding I added m_is_hiden property to elements and in CWndEvents::Show(const uint window_index); elements with true are skipped.
Hey guys,
Developing business code that makes use of graphical elements panels is one thing and this library is very helpful. However, when it comes to low performance or bugs that need to be reproduced,
there is nearly no way around the Strategy Tester.
That said, trying to fix things in a live chart is extremly tedious (e.g. waiting until certain conditions are met so I can click on graphical elements... gah)
It would be beyond helpful if we could properly test stuff within the ST!
1. Did the MetaTrader dev team talk somewhere on the forum about it why void OnChartEvent is not being triggered in the ST?
2. Is there any chance to establish a workaround?
Cheers,
Marcel
The macro in the file Defines.mqh
is not compatible with Alglib {ap.mqh)
I had to rename it.
After installing the platform update on 2132, compilation errors appeared:
How to fix: