
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
Example of a simple code:
Anything once started has to be finished. Even if nobody needs it. That's the principle.
You do. If the interface can not only be drawn, but used. I hope so.
Need. If the interface can not only be drawn, but used. Hopefully.
Absolutely. That's what I'm working on.
Here, by the way, is a serious disadvantage of using names in Russian. It cuts off more than 90% of non-Russian-speaking programmers at once. After all, they see some quasi-labels. Duplicating this branch in several languages is a tough test, of course, for non-Russian speakers.
Looking ahead, can I ask you a couple of questions?
Since your GUI is created without using classes, several uncertainties arise at once.
After all, what, first of all, should be the requirements to the GUI as a product?
It is convenience and intuitiveness of creating a GUI, as well as its convenient use in the process of work.
In this regard:
Question 1
What mechanism is there for a programmer to handle event handling on the part of your GUI?
For example, in my GUIs, when creating a control, I add a pointer to a handler function when a change event occurs on that control.
Example code:
Question 2
How can a programmer get access to the state of a particular GUI element?For example, in my GUI I can get the state of checkbox (bool) like this:
.
but I use nested classes.
How do you do it?
Example code:
Question 2
How can a programmer get access to the state of a particular GUI element?For example, in my GUI I can get the state of checkbox (bool) like this:
but I use nested classes.
How do you do it?
Nicholas hi!
I'll answer in order:
1. The user DOES NOT (from the word at all) interact with my code. It is not necessary. Further you will understand why. The user needs ONLY the markup language. (I've emphasised this several times before, but I always get this recurring question from programmers. ) The reason is that the user only "initialises" the array using language keywords that are defined by defines in the constructor code. The interpreter (indicator) sends an array with the markup code (the one I showed above) to the constructor (which is the EA on the same chart) and the constructor reads the array and builds the GUI. The markup language code is an instruction for the constructor. It performs construction (drawing, initialisation of element parameters, settings, etc.) according to it.
2. The mechanism is simple. After finishing editing the interface, the user calls the context menu of the constructor by double-clicking on the chart and selects the save option. The constructor prints all the information into two files. These files are used by the engine.
Let me explain in detail: the user connects the two files received from the constructor and the engine (which I will provide) to his EA (in the header of the EA. I will provide an example of connection). Then, writes several calls in the functions OnInit(), OnTimer(), OnChartEvent() and OnDeinit() (I will provide an example). Next, goes into a file printed by the constructor called Internal_API. This file contains everything necessary to connect GUI controls to the Expert Advisor/user indicator. That is - generated functions of the elements and detailed instructions. I will provide connection examples later.
Again, nothing complicated. Everything is there. Here is for example how it looks like with the interface above:
1. Wrote a window.
2. Followed the instructions below:
3.
4. Open the InternalAPI file and start the connection. The file contains everything.
Theuser only has to write his actions in the conditions of the OnGuiEvent() function. The rest does NOT need to be touched.
.
Switching the state of controls, as well as getting/setting their values is done with the help of functions generated by the constructor, which the user will see in the intellisense.
From the file code above, the user is only working with this part:
Nicholas, hi!
I'll answer in order:
1. The user WILL NOT (from the word at all) interact with my code. It is not necessary. Next you will understand why. The user needs ONLY the markup language. (I've emphasised this several times before, but I always get this recurring question from programmers. ) The reason is that the user only "initialises" the array using language keywords that are defined by defines in the constructor code. The interpreter (indicator) sends an array with the markup code (the one I showed above) to the constructor (which is the EA on the same chart) and the constructor reads the array and builds the GUI. The markup language code is an instruction for the constructor. It performs construction (drawing, initialisation of element parameters, settings, etc.) according to it.
2. The mechanism is simple. After finishing the interface editing, the user calls the context menu of the constructor by double-clicking on the chart and selects the save option. The constructor prints all the information into two files. These files are used by the engine.
Let me explain in detail: the user connects the two files received from the constructor and the engine (which I will provide) to his EA (in the header of the EA. I will provide an example of connection). Then, writes several calls in the functions OnInit(), OnTimer(), OnChartEvent() and OnDeinit() (I will provide an example). Next, goes into a file printed by the constructor called Internal_API. This file contains everything necessary to connect GUI controls to the Expert Advisor/user indicator. That is - generated functions of the elements and detailed instructions. I will provide connection examples later.
Again, nothing complicated. Everything is there. Here is for example how it looks like with the interface above:
1. We have written a window.
2. Followed the instructions below:
3.
4. open the InternalAPI file and start the connection. The file contains everything.
Theuser only has to specify his actions in the conditions of the OnGuiEvent() function. The rest does NOT need to be touched.
Switching the state of controls and getting/setting their values is done with the help of functions generated by the constructor, which the user will see in the intellisense.
Peter, I don't understand you. You didn't answer the questions.
It is important for programmers to know how to interact with your GUI while working.
Here is an example of my GUI. I clicked the light/dark theme shortcut and this event immediately triggered the function to change background colours and lines. How do you do this interaction?
What does it mean " The user will NOT interact (at all) with my code. "?
The programmer needs to interact, not with the code, but with the events that should generate this code.
After all, GUI is not a separate independent program. The GUI must ultimately interact with the developer's main program. Whether it is an indicator or EA.