There is a Service directory in MetaEditor. What is its usefulness? And how to use it?

 
Hello,

There is a Service directory in MetaEditor.

What is its usefulness?
And how to use it?
Just curious.

Thanks,
Pierre


 
Pierre Rougier:
Hello,

There is a Service directory in MetaEditor.

What is its usefulness?
And how to use it?
Just curious.

Thanks,
Pierre


ir allows to run new kind of programs(similiar.to.scripts) without having to attach them to any chart.

Kind of "background process".
 

One possible use is described here: https://www.mql5.com/en/docs/runtime/running

Services have a single OnStart() handler, in which you can implement an endless data receiving and handling loop, for example creating and updating custom symbols using the network functions.



 
  1. https://www.mql5.com/en/forum/303721


  2. Terminal: Added new type of MQL5 applications — Services. This new type enables the creation of custom price feeds for the terminal, i.e. to implement price delivery from external systems in real time, just like it is implemented on brokers' trade servers.

    Unlike Expert Advisors, indicators and scripts, services are not linked to a specific chart. Such applications run in the background and are launched automatically when the terminal is started (unless such an app was forcibly stopped).

    Services can be managed from a new section within the Navigator window:




    How to create services
    To create a service template, use the corresponding MQL5 Wizard option. Services have one OnStart entry point, similar to scripts. At this point, you can implement an endless data receiving and handling cycle using  network functions.

    How to launch the services
    To run multiple Expert Advisor or indicator copies with different parameters, you should launch them on different charts. In this case different program instances are created, which then operate independently. Services are not linked to charts, therefore a special mechanism has been implemented for the creation of service instances.

    Select a service from the Navigator and click "Add service" in its context menu. This will open a standard MQL5 program dialog, in which you can enable/disable trading and access to signal settings, as well as set various parameters.




    A service instance can be launched and stopped using the appropriate instance menu. To manage all instances, use the service menu.

MetaTrader 5 Platform Beta Build 1995: Economic Calendar, MQL5 applications as services and R language API
MetaTrader 5 Platform Beta Build 1995: Economic Calendar, MQL5 applications as services and R language API
  • 2019.02.15
  • www.mql5.com
The beta version of the updated MetaTrader 5 platform will be released on February 15, 2019...
 
Reason: