Creating a GUI for MQLs in graphical mode.

 

I raised this topic a couple of years ago, when different libraries for GUI creation started to develop rapidly. A lot of them have been created since then, but the process of creation remained at the level of 30 years ago (who still remembers how they suffered with interface, creating it by hand in Win API?) If I'm wrong and such tool appeared, I will gladly accept a kick and take it back.

-------

Here is the simplest example from VS 2017, C# Windows Forms. On the left is a control toolbar that can be dragged and dropped onto the form.

panelform

And here is some of the code that is generated for this rudimentary form.

private void InitializeComponent()
        {
            this.btnDoSomething = new System.Windows.Forms.Button();
            this.textBox1 = new System.Windows.Forms.TextBox();
            this.SuspendLayout();
            // 
            // btnDoSomething
            // 
            this.btnDoSomething.Location = new System.Drawing.Point(12, 12);
            this.btnDoSomething.Name = "btnDoSomething";
            this.btnDoSomething.Size = new System.Drawing.Size(100, 23);
            this.btnDoSomething.TabIndex = 0;
            this.btnDoSomething.Text = "Do something";
            this.btnDoSomething.UseCompatibleTextRendering = true;
            this.btnDoSomething.UseVisualStyleBackColor = true;
            // 
            // textBox1
            // 
            this.textBox1.Location = new System.Drawing.Point(12, 53);
            this.textBox1.Name = "textBox1";
            this.textBox1.Size = new System.Drawing.Size(100, 20);
            this.textBox1.TabIndex = 1;
            this.textBox1.Text = "Hello MQL5!";
            this.textBox1.TextChanged += new System.EventHandler(this.textBox1_TextChanged);
            // 
            // Form1
            // 
            this.AutoScaleDimensions = new System.Drawing.SizeF(6 F, 13 F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.ClientSize = new System.Drawing.Size(133, 98);
            this.Controls.Add(this.textBox1);
            this.Controls.Add(this.btnDoSomething);
            this.Name = "Form1";
            this.Text = "Form1";
            this.ResumeLayout(false);
            this.PerformLayout();

        }

        protected System.Windows.Forms.Button btnDoSomething;
        private System.Windows.Forms.TextBox textBox1;

So I'm wondering, who would take up a project where such code would be parsed and code for graphics based on any of the libraries presented on this site?

I've been writing an article in the "Eating and earning in MQL5" section without the author's name for more than a year.

55Rewriting and automatic modification of MQL5 source codes usingRegularExpressions.
Getting the list of functions, global variables, defines, classes, etc.

And why no one takes it? Because nobody needs this parsing. The market has a brilliant program Doxygen, which is being polished and improved for more than 10 years. And no one is interested in trying to create a pathetic copy of it (which will certainly be pathetic in comparison). And an article recently came out on the subject of Automatic Documentation Creation...

So,

  1. If there's already such a project.
  2. Who would be interested in such a graphical interface creation?
I made a separate branch on purpose, since it quickly gets lost in the "Eating and earning in MQL5" branch, and not many people read it.

 

A GUI for METATRADER is such a distant possibility, for now. For creating panels - okay. But you don't need any more.

Although I agree with you - "Visual" MetaEditor would be a good idea

 
Vladislav Andruschenko:

A GUI for METATRADER is such a distant possibility, for now. For creating panels - okay. But you don't need any more.

Although I agree with you - the "Visual" MetaEditor would be perfect.

Why do you have to complicate everything, in particular MT-MQL? MQL, imho, is already overcomplicated. You may create your panels in VS and everything you need, for example through DLL. There is no need to make a monster out of MT-MQL)).

 
Yuriy Asaulenko:

Why make things so complicated, MT-MQL in particular? MQL, imho, is already overcomplicated. You have VS, and you may create your panels and everything you need there, for example through those DLL's. There's no need to make a monster out of MT-MQL. There's no need to turn MT-MQL into a monster)).


I'm just daydreaming :-) (VISUAL for charting and trading systems), it is clear that there are many designers already....

To be honest, I drew my first panel in Photoshop. and it's still there...

now i'm trying to draw directly in the terminal, but i realise that only a few people use it.

And custom panels are easier to make individually.

Although I've studied articles about drawing libraries extensively. But I've decided that the use of these libraries will only be useful for 1% of the time, so I've given up.

 
Yuriy Asaulenko:

Why make things so complicated, MT-MQL in particular? MQL, imho, is already overcomplicated. You have VS, and you may create your panels and everything you need there, for example through those DLL's. There's no need to make a monster out of MT-MQL. There's no need to turn MT-MQL into a monster)).

I used to do it that way. Below is an example of a simple setup panel for multi-strategy (oh my!) EA. But it's cutting off the market!

And I don't understand, what does MT have to do with it? I'm just suggesting to make a parser script in MQL. You may do it in C++/C#, but then they won't even take it to the articles.

Oops, forgot the picture, here it is, a simple one


 
Vladislav Andruschenko:


I'm just dreaming :-) (VISUAL for charting and trading systems), it is clear that there are many designers already....

To be honest, i drew my first panel in photoshop. and it's still there...

now i'm trying to draw directly in the terminal, but i realise that only a few people use it.

And custom panels are easier to make individually.

Although I've studied articles about drawing libraries extensively. But decided that the use of these libraries will only be useful in 1 %, I gave up.

So you do without any libraries? I've just got a task to make quite a complex panel, and I feel it will be reconfigured many times.

So far I've decided to make a visualization in VS and then use my hands to get the coordinates and dimensions of the controls, then again, use my hands to translate them to a library. For now I'm leaning towards the libraries by Anatoly Kazrsky, he's done a monster job there. Everything will be faster than the code->start->corrections with results recorded on paper->correct code... etc.

 
Alexey Volchanskiy:

So you do it without any libraries at all? Just here I have the task to make quite a complex panel, and, I feel, it will be reconfigured many times.

So far I've decided to make a visualization in VS, then retrieve coordinates and dimensions of the controls, and translate them to a library by hand. For now I'm leaning towards the libraries by Anatoly Kazrsky, he's done a monster job there. All will be faster than code->start->corrections with results recorded on paper->correct code... etc.

Better to use Kazarsky's library,

But yes, I have libraries for drawing. they're standard. (not the same as Kazarsky's of course :-))

I use drawing very seldom, so there's no point in wasting time on it.


I used to draw in photoshope, then I drew in Delphi and then organized according to the coordinates :-)

I wouldn't do that now, but I drew my first panel in MQL at that time (previously it was in Delphi).

I'm still afraid to touch it :-) I update it, of course, and I have optimized the code 10 times already. But I am thinking about drawing the same panel with the regular buttons......

but there are pros and cons: the regular buttons are not nice : Kanvas does not work in the tester ...............

 
Alexey Volchanskiy:

That's what I've done before. Below is an example of a simple setup panel for a multi-strategy (oh bang!) EA. But it does cut off the market!

And I don't understand what MT has to do with it? I'm just suggesting to make a parser script in MQL. You may do it in C++/C#, but then they won't even take it to the articles.

Oops, forgot the picture, here it is, a simple one.

If you want to use it in Market, you'll have to deal with it. Only MQL. ((

You don't need it for yourself, you won't need it with VS.

 
Yuriy Asaulenko:

If it's for Market, yeah, bada bada. Only MQL. ((

And for yourself, you don't need it, and with VS everything is simple.

It's very simple and fast with VS. I even made that panel with shared file access, and it worked fine and fast.

I don't even know, maybe I should quickly create one using VS and translate it to MQL after I've eliminated childish illnesses?

But since I won't be able to create a branch for my panel in C# at this forum. So, I will have to work in red again, and will have to rubbish here? What do you think, dear moderators? May I post the panel in C# as a part of the project?

Of course, I can post the MQL5 part in a branch and the C# panel in the blog. But it's kind of humiliating, as if I'm deprived of it and have to hide in the blog.

 
Alexey Volchanskiy:

It's very simple and fast with VS, I even made that panel with access via shared files and it worked fine and fast.

I don't even know, maybe I should quickly create a VS variant and translate it to MQL after I've eliminated childish illnesses?

But since I won't be able to create a branch for my panel in C# at this forum. So, I will have to work in red again, and will need to engage in this rubbish? What do you think, dear moderators? May I post the panel in C# as a part of the project?

Of course, I can post the MQL5 part in a branch and the C# panel in the blog. But it's kind of humiliating, as if I'm deprived of it and have to hide in the blog.

I like file sharing very much - everything is simple, fast and easy to use. With RAM-Disk I don't need any DLL's or gizmos at all, it's >1.5 GBytes/second. Enough for everything, and even leftovers)).

And all sorts of DLLs can be made later, at your leisure, if necessary.

 
Alexei, is it possible to work with your panel in C# so that it is displayed inside the chart window?