Discussion of article "MQL for "Dummies": How to Design and Construct Object Classes" - page 2

 

I just upgraded the terminal to a downloadable one to be sure.

updated the library, which is pretty much it.

ran the terminal, opened the file and here it is.

I really liked the grouping of the buttons =))))))

Документация по MQL5: Файловые операции / FileOpen
Документация по MQL5: Файловые операции / FileOpen
  • www.mql5.com
Файловые операции / FileOpen - Документация по MQL5
 

Could you please upload all the necessary files for this application in 1 archive and respect the structure so that there is one MQL5 folder.

I have checked all files open normally and have readable content.

 
CoreWinTT:

Could you please upload all the necessary files for this application in 1 archive and respect the structure so that there is one MQL5 folder.

I have checked all files open normally and have readable content.

sent to you in a private message.
 

Thanks.

Now everything works, it compiles normally, maybe the problem was in a bit file that was either uploaded to the server incorrectly, or I may have had an error when downloading, but I didn't notice.

In general it is very inconvenient to download individually the number of files more than 5, it would be great to make an archive or a whole installation programme.

I will continue to understand and try to put it somewhere, I will report on the results.

Overall, I really like the functioning of the cross button.

but the minimise button is disappointing ........

does not work, and in idea, as I understood it should minimise below the following lines?

 

In general, quite informative article. only a lot of references to "wikipedia".

And so it turns out to be a professional constructor for such a menu, on which everything is clicked and added, in general it works.

It would also be very nice to have some simple manual on how to access the cells of this miracle.

and let's assume that the Expert Advisor reads values from the cells at the tick event.

and these cells would be filled with input parameters during the oninit process.

Or do I have to write such a thing myself????

and this serves as a visual constructor?

 

Thanks for the valuable comments. I have already puzzled over them and will try to fix most of them.

 

of the type to form an array of structures

which will be available to the whole programme

and which will store data in this format

and to be able to refer to these values

as Header[1].2 column.

at least with the data type string

I see that there is already something similar here.

string Mstr[][3]=
  {
     {"MACD","",""},
     {"NEW1","metod",""},
     {"elders","new2",""},
     {"Fast","new3",""},
     {"Slow","new4",""},
     {"Signal","new5",""},
     {}
  };

like a two-dimensional array.

and it scolds if you do something like this.

     {"NEW1",""+TrailingStop+"",""},


probably getter and setter cannot split encapsulation.

 

Each cell has its own unique name. You can see it by hovering the mouse cursor over the object. The ClassMasterWindowsEXE.mqh file shows how to access cells.

//+------------------------------------------------------------------+
//| Method of intercepting and processing events OnChartEvent() |
//+------------------------------------------------------------------+
void CMasterWindowsEXE::OnEvent(const int id,
                                const long &lparam,
                                const double &dparam,
                                const string &sparam)
  {
   if(on_event) // event handling is enabled
     {
      //--- pressing the START button in the main window
      if(id==CHARTEVENT_OBJECT_CLICK
         && StringFind(sparam,"CWin1",0)>=0
         && StringFind(sparam,"STR19",0)>0
         && StringFind(sparam,".Button",0)>0)
        {
         Generator();
        }
      //--- edit variables in the EDIT STR18 editor
      if(id==CHARTEVENT_OBJECT_ENDEDIT
         && StringFind(sparam,"CWin1",0)>=0
         && StringFind(sparam,"STR18",0)>0)
        {
         string textedit=ObjectGetString(0,sparam,OBJPROP_TEXT);
         if(StringFind(textedit,".",0)>=0)
           {
            ObjectSetString(0,sparam,OBJPROP_TEXT,"");
            ChartRedraw();
            MessageBox("The file name must not contain a full stop!","File name error.",MB_OK);
           }
         else nameFile=textedit;
        }
 

but here all string parameters turn out to be

and that is, for each button it will be necessary to write an event such as

  if(id==CHARTEVENT_OBJECT_CLICK
         && StringFind(sparam,CWin1.STR2.RowType3.Button3,0)>=0
         && StringFind(sparam,"STR19",0)>0
         && StringFind(sparam,".Button",0)>0)
        {
         Generator();
        }

for button +

extract value from string such and such, convert it to integer, add one and put it back.

and in the event ontic

just then

extract value from string such and such there convert to integer etc. etc.

in general, if there was such a thing as a structure, so that you could set the type of stored objects, and the module of value transfer into string could be implemented inside the class.

I understood correctly that tracking of for example a plus cell can be done by inserting code into an event.

  if(id==CHARTEVENT_OBJECT_CLICK
         && StringFind(sparam,"CWin1.STR2.RowType3.Button3",0)>=0)
        {
         Generator();
        }

 
and I'm also wondering if the minimise button will work.