Wishes for MT5 - page 31

 

Please consider


Proposal to add to MQL5 functionality that allows changing from an indicator or expert or from a script

Max bars in the window...

It may be useful to make a program controllable limit



 
To developers. Please pay attention to my request18097(I understand this thing is controversial, but still)...


PS

Also, if you can - please make optimization results and optimization graph get deleted, in case testing is going on in normal mode.

Or is it such a trick to be able to watch it at any time?

 
Interesting:


PS

Also, if you can - please make optimization results and optimization graph get deleted, in case testing is going on in normal mode.

Or is it just a trick to be able to see it at any time?

I would object to such a suggestion. After optimization, to analyze results I need to check multiple passes separately in normal mode (achieved by clicking on the corresponding pass). If optimisation results disappear after the first test in normal mode, a valuable opportunity to work with the results will be lost.

 
Yedelkin:

I would object to this suggestion. After optimization, I need to test many passes individually in normal mode to analyze the results (achieved by clicking on the corresponding pass). If optimisation results disappear after the first test in normal mode, a valuable opportunity to work with the results will be lost.

Well, I do not insist, which is what the line says - > Or is it such a trick to be able to see at any time?

 

1)You need to add normal events, not what you have implemented.

The first thing that popped into my head

OnBar,OnBarClose,OnQuote,OnDomChanged...

OnPositionOpened,OnPositionClosed...

OnConnected,Ondisconnected...

changes in request statuses, etc.

2) make human-like documentation, like here: http://msdn.microsoft.com/en-us/library/system.data.aspx

3) "Bring API to the masses" -)

ps It seems that the developers either make software for newbies or are themselves

System.Data Namespace ()
System.Data Namespace ()
  • msdn.microsoft.com
The namespace provides access to classes that represent the ADO.NET architecture. ADO.NET lets you build components that efficiently manage data from multiple data sources. In a disconnected scenario such as the Internet, ADO.NET provides the tools to request, update, and reconcile data in multiple tier systems. The ADO.NET architecture is...
 
anubis:

1)You need to add normal events, not what you have implemented.

The first thing that popped into my head

OnBar,OnBarClose,OnQuote,OnDomChanged...

OnPositionOpened,OnPositionClosed...

OnConnected,Ondisconnected...

changes in request statuses, etc.

2) make human-like documentation, like here: http://msdn.microsoft.com/en-us/library/system.data.aspx

3) "Bring API to the masses" -)

ps ps It seems that developers either make software for newbies or are like newbies themselves.

There is such a thing as USER events. You can implement any number of them by yourself.

I've been catching OnConnected and OnDisconnected events via a timer for a long time now. If you want, you can also create OnBar and OnBarClose or any other events.

Then you can easily catch them in OnChartEvent with help of such block (there is all this in help, why to re-invent the wheel?).

  if(id>CHARTEVENT_CUSTOM)
  //User event is received / Получено пользовательское событие
  {
  }

PS

And on class level you can handle any (well, almost any) event...

 
Interesting:

There is such a thing as USER events. You can implement any number of them yourself.

I've been catching OnConnected and OnDisconnected with a timer for a long time now. If you want, you can also create OnBar and OnBarClose or any other events.

After that just catch them in OnChartEvent with help of this block (it's all in the help, why to re-invent the wheel?).

PS

And on class level you can handle any (well, almost any) event...

Interesting to see how you implement it (OnConnected?)

 

dentraf:

Interesting to see how you implement this (OnConnected?)

Yes please :)

Here is an example of handling these events in Expert Advisor with CMqlManagerConnect class (module attached to the post).

1. Copy the module to the \MQL5\Include\ folder (preferably in a subdirectory)

I have it all here - MQL5\Include\Units\Objects.

2. In the Expert Advisor add a link to this file.

////////////////////////////////////////////////////////////////////////////////
//              Object classes, used in working the trade system              //
////////////////////////////////////////////////////////////////////////////////
#include <\Units\Objects\UManagerConnect.mqh> //Class - CMqlManagerConnect

3. Create a variable of CMqlManagerConnect type.

////////////////////////////////////////////////////////////////////////////////
//             Global variables, used in working the trade system             //
////////////////////////////////////////////////////////////////////////////////
//****************************************************************************//
//               Objects created on the grounds of the classes                //
//****************************************************************************//
CMqlManagerConnect ManagerConnect; //Менеджер контролирующий состояние коннекта

4. In the timer it goes like this

void OnTimer()
{
//----------------------------------------------------------------------------//
//Work variables / Служебные переменные
//----------------------------------------------------------------------------//
//****************************************************************************//
//                  Контроль состояния соединения с сервером                  // 
//****************************************************************************//
ManagerConnect.OnEventTimer();
//----------------------------------------------------------------------------//
}

5 You should write the following text in OnChartEvent

void OnChartEvent(const int id,         // идентификатор события  
                  const long& lparam,   // параметр события типа long
                  const double& dparam, // параметр события типа double
                  const string& sparam  // параметр события типа string
                  )
{
//----------------------------------------------------------------------------//
//Work variables / Служебные переменные
//----------------------------------------------------------------------------//

//****************************************************************************//
//                          Processing user events                            //
//****************************************************************************//
  if(id>CHARTEVENT_CUSTOM)
  //User event is received / Получено пользовательское событие
  {
  //Выводим текстовое сообщение о событии в комментарий
  Comment("User Event ",sparam);

    if(id==CHARTEVENT_CUSTOM+1)
    //Соединеие с сервером востановлено
    {
    //тут обрабатываем все что нам нужно
    }

    if(id==CHARTEVENT_CUSTOM+2)
    //Соединеие с сервером потеряно
    {
    //тут обрабатываем все что нам нужно
    }

  }
//----------------------------------------------------------------------------//  
}

PS

You can, of course, not pass the events to OnChartEvent, but process them directly in the class (either in the base or descendants). But even with this approach, I recommend leaving the reference to OnChartEvent, because you may need to tell the other charts about the events... :)

Files:
 
Interesting:

Yes please :)

Here is an example of how these events are handled in the Expert Advisor using the CMqlManagerConnect class (the module is attached to the post).

1. Copy the module to the \MQL5\Include\ folder (preferably in a subdirectory)

I have it all here - MQL5\Include\Units\Objects.

2. In the Expert Advisor add a link to this file.

3. Create a variable of CMqlManagerConnect type.

4. In the timer it goes like this

5 You should write the following text in OnChartEvent

PS

You can, of course, not pass the events to OnChartEvent, but process them directly in the class (either in the base class or in the descendants). But even with this approach, I recommend leaving the reference to OnChartEvent, because you may need to tell the other charts about the events... :)

Did you write the CMqlManagerConnect class yourself? Do you have a solution for server retrieval when you lose the connection to the server?
 
dentraf:
Did you write the CMqlManagerConnect class yourself? Do you have a solution for server enumeration when you lose connection to the server?
Of course I wrote it myself (for example), but I have a different way of solving this problem. There is no brute force solution (at least for now), but we will need to address this issue as well (people have already contacted the developers about this)...