Crowdsourced GUI. Open beta testing. - page 18

 
Реter Konow:

Clarify, are these 'nodes' dynamic and interactive objects as well as the links between them? It's not just a scheme, is it? If so, I saw something similar in Andrei Barinov's graphic strategy builder. Is that what you mean?

Is the logic of links between nodes unchangeable and following predefined rules, or is it a frivolous scheme created as you please?

In principle, I don't see anything difficult to create it. It's a couple or three days' work. I don't need any extra code. I'll do it myself, after the main things that are a priority right now.

Yes, this is a representation of the strategy, just not Andrei Barinov's, my own developments.

Visual editing is not expected. There will be automatic generation.

"No need for additional code." - So there may not be a strategy in the form of a file. So you want to make a parser? We already have one, why do you need it :) ? I can send you examples of how to work with the strategy, it's easy and convenient.

Here is an example:

#include <Greshnik\\Strategy.mqh>

//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+
void OnStart()
  {
   cStrategy *st=new cStrategy();
   st.Read_from_file("Strategy\\Test\\1.txt");  //Читаем с файла
   st.Print_strategy();                         //Вывести в лог
   int count_top_nodes=st.Get_top_nodes_count();//Количество узлов на вершине
   int my_node=-1;
   for(int i1=0; i1<count_top_nodes; i1++)
     {
      int node_id=st.Get_top_node(i1);
      if(node_id<0)
        {
         Print("Узла на вершине нету по индексу:",i1);
        }
      else
        {
         my_node=node_id;
        }
     }
   if(my_node>=0)
     {
      Print("Тип узла: ",EnumToString(st.Get_node_type(my_node)));
      Print("Количество родительских узлов: ",st.Get_parents_nodes_count(my_node));
     }
   delete st;
  }

When an error you need to look at the log, there in Russian everything.

And in the source code everything is described.

 
Aliaksandr Hryshyn:

Such an example, it doesn't reflect how I want it to look, it shows the structure and some features. The nodes also have some information to show. Bottom-up direction.

There is no way without additional code, it allows to read this kind of structure from a text file and get all information about it.

I would like a nice presentation of this structure.

It needs dynamic creation of graphical elements.

Here's an example of a file with this kind of structure, you can see what the structure is for :)

This file can be read by the code and there is convenient access to all the parameters of the structure. Not all types of nodes are represented here.

I don't insist on help, I know it requires some effort. Some optimal node placement problem is required, it is not good to place by list due to bad readability of the structure.

The structure has no loops. To traverse the graph you can use recursion starting from a vertex, mark nodes where you have already been. Then you choose any unmarked node and define all nodes from it, which form another graph not connected to the main one, etc.

I could have done it all myself, but there are a lot of other tasks now.

This is no longer for Peter. Don't distract him, please.
It's more for you.

 
Aliaksandr Hryshyn:

Yes, this is a presentation of the strategy, just not by Andrei Barinov, his own work.

No visual editing is envisaged. There will be automatic generation.

"No need for extra code." - So there may not be a strategy in the form of a file. So you want to make a parser? We already have one, why do you need it :) ? I can send you examples of how to work with the strategy, it's easy and convenient.

Here is an example:

When an error you need to look at the log, there in Russian everything.

And in the source everything is described.

I can create general solution for all such interactive and flexible schemes, but it is not soon. In your case you need specific solution, suitable to a certain idea. I'm not sure I can help with that. You need to create graphical "mechanics" of the nodes and links first, and then tweak for specific ideas. I can create the mechanics, but further "fine-tuning", will narrow the range of application and make it an individual project. Maybe Nikolay can help. I'm very busy at the moment.

 
Реter Konow:

I could create a general solution, for all sorts of interactive and flexible schemes, but it's a long shot. In your case, you need a specific solution that fits a specific idea. I'm not sure I can help with that. You need to create graphical "mechanics" of the nodes and links first, and then tweak for specific ideas. I can create the mechanics, but further "fine-tuning", will narrow the range of application and make it an individual project. Maybe Nikolay can help. I'm very busy at the moment.

Good.

 
Nikolai Semko:

This is no longer for Peter. Don't distract him, please.
It's more your place.

Yes, that's it.

 
Aliaksandr Hryshyn:

Such an example, it doesn't reflect how I want it to look, it shows the structure and some features. The nodes also have some information to show. Bottom-up direction.

There is no way without additional code, it allows to read this kind of structure from a text file and get all information about it.

I would like a nice presentation of this structure.

It needs dynamic creation of graphical elements.

Here's an example of a file with this kind of structure, you can see what the structure is for :)

This file can be read by code and there is easy access to all the parameters of the structure. Not all types of nodes are represented here.

I don't insist on help, I know it requires some effort. Some optimal node placement problem is required, it is not good to place by list due to bad readability of the structure.

The structure has no loops. To traverse the graph you can use recursion starting from a vertex, mark nodes where you have already been. Then you choose any unmarked node and define all nodes from it, which form another graph not connected to the main one, etc.

I could do it all myself, there are just a lot of other tasks now.

There are classical tools for graph visualization: http: //www.graphviz.org/documentation/ aka https://en.wikipedia.org/wiki/DOT_(graph_description_language)

i.e. you have to generate a .dot file of your graph according to your structure and run the renderer (there are several to choose from)

If I'm not mistaken, the .dot file can be opened in yEd(https://www.yworks.com/products/yed) to correct it with the mouse :-)

PS. graph visualisation is not a very easy task to say the least :-) It's still being solved in the world...

 
So I'd like an MQL solution. OK, I'll have to do it myself :).
 

We can only guess at how the code generated by Peter's tool will link to the rest of the program.

"Kernel, markup" ..... no comment.

I understand the following types of markup: xml, html, json, xaml and so on.

I understand inheritance, which allows both modifying source controls and subscribing to their events without diving into the source code of the controls.

Peter uses procedural programming, so referring to a control as an object, since there are no a priori objects in Peter, is impossible.

Which means you can't change them on the fly, much less bind them to data...

We wait... We are waiting to see how it turns out. But it would be better if Peter generated ex4 instead of mqh so that we don't have to dig around in ... kernel.

 
Алексей Барбашин:

We can only guess at how the code generated by Peter's tool will link to the rest of the program.

"Kernel, markup" ..... no comment.

I understand the following types of markup: xml, html, json, xaml and so on.

I understand inheritance, which allows both modifying source controls and subscribing to their events without diving into the source code of the controls.

Peter uses procedural programming, so referring to a control as an object, since there are no a priori objects in Peter, is impossible.

Which means you can't change them on the fly, much less link them to data...

We wait... We are waiting to see how it turns out. But it would be better if Peter generated ex4 instead of mqh so that we don't have to dig around in ... kernel.

That's funny :) All the kernel is crammed with objects.

Alexey, you promised to help me to test it. It's to your credit that this editor will see the light of day. You motivated me to finish the job.

As soon as I will put up the editor (on Tuesday), together we will create a simple panel of buttons, checkboxes and input fields and connect it to a simple Expert Advisor. And all questions will be answered at once.)

 
Aliaksandr Hryshyn:
So I'd like a solution in MQL. OK, I'll have to do it myself :).

it's time to get out of the sandbox :-) a baby spatula is not enough...

different tasks require different tools

on the other hand: you can hammer in screws with a hammer (even a microscope)