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 are very few programmers who are handy and can handle and use additional libraries.
Thank you. Your opinion, as a developer and salesman with vast experience, is very important to me.
Thank you. Your opinion, as a developer and seller with vast experience, is very important to me.
Thank you.
All of my connections are purely external. It doesn't affect it in any way.
You drew the GUI in the markup language. It is carried by indicator "engine".
We connected 2 files to the EA and filled in the connection file.
We have started the engine with GUI and the Expert Advisor.
And everything works.
...
I disagree. Everyone who programs in MQL, even non-professionals, if they have been doing it for a long time, has rather many of their original functions. It's easy to batch them together and convert them into a file in the form of a library. I think that most are able to do it.
I disagree. Everyone who programs in MQL, even non-professionals if they have been doing it for a long time, has accumulated a lot of their own original functions. It's easy to put them together and file them as a library. I think most people can do it.
I will repeat the task once again:
It's pretty straightforward. You need to draw two simple forms in C#. There should be a button, an input field and a checkbox. Add a DLL. Connect with MT5.
I will make my analogue in MT. Same forms and elements, and doing the same functions. Next, let's compare solutions in terms of quality and development potential.
//--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Here is my solution:
//-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Control code in the Expert Advisor:
Files connected below:
1. Test EA file (install in EAs folder, open, save, compile, put on chart).
2. The External Connection file (install it in the inclusion folder).
3. Connection Properties file (install in the inclusive folder).
4. Forum sample 2 file with window code (view only).
5. Engine (install in the indicators folder. Put it on the chart with the test EA).
I hope my opponents will provide their solution to the problem of connecting Windows form via DLL.
I have a feeling that you are the only one participating in this "special Olympiad" :-)
Please, in the appendix. When you start the Expert Advisor, a window will open, in the window there are two buttons, two text boxes and a checkbox. The colour of the buttons and the text in the first text box changes once per second. If text is entered in the second text field, the Expert Advisor will open an alert with an event message and this text. Pressing the buttons also opens the alert and the first button opens form-2, the second button closes form-2. You can also close form-2 with a cross. The main form (form 1) will not be closed by a cross, it will disappear when the EA is disconnected. The checkbox also opens an alert and there are two types of events from it: 1 and 2 - uncheck and checkbox.
Most of my time was spent on remembering C# (if I knew something there:), I haven't done anything in it for more than three years and also on developing a class for passing events, but it's universal, it can be used in any project. So now when creating a gui it counts for minutes ;).
If you're wondering how time consuming it is internally, you need to call a class method to pass an event to the EA - one line. To be able to control controls from an EA you need to write two methods, one in the form class and one in the event transfer class, one line of code in each of them.
I haven't made checkbox controls in their EA - I'm bored with them, they have already set colour and text - both text parameter and ints. Colour is transmitted as RGB, but probably could be done by one variable, I did not deeply delve into it.
And there is an assumption that someone who knows C# and FindowsForms better can do it twice as easy - without two methods to set the properties, but with only one, and maybe do something better.
Well, the gates to the infinite world of C# and FindowsForms are open.