Services. Are they up and running yet? - page 5

 
We will probably all have to wait for a concrete example to illustrate the exact purpose of this new feature.
 
Icham Aidibe:
We will probably all have to wait for a concrete example to illustrate the exact purpose of this new feature.

Yes, we have to wait until we are shown the tasks of the services:

Forum on trading, automated trading systems and trading strategy testing

Services. Already working?

Renat Fatkhullin, 2018.12.18 09:20

Services run continuously, communicating with the terminal via a special task queue. We will disclose the tasks later.

Services are not experts or chart/timer/price event handlers. Event models are not necessary for continuous processes, the point of which is never to interrupt and not to depend on accounts/servers.

The services are functionally separated from the experts, so that people don't create Frankenshines. Services have their own area of application.


 
This thing will be useful: heavy calculations in the background using multithreading, work with long operations (loading news from the site, file operations with large amounts of data...), implementation of schedules (weekly report on transactions,...).
 
Nikolai Semko:
Am I correct in assuming that the graphical capabilities of the services are zero?
Or is this a temporary phenomenon for the time being?
All charts can be accessed and objects can be managed, but there are no chart notifications and there won't be any.

That is, it is possible to build visual things.
 
Vladimir Karputov :

Oui, vous devez attendre que les tâches des services vous soient présentées:


Yes, thank you !

Something has already been created that can be used as a service: the forex calendar - but I am not sure if this is really how to use this new feature - I imagine it can receive information about calendars and provide it to the whole terminal (all charts, all IAs, all indicators can be served this way) - I will wait for future improvements.

 
Renat Fatkhullin:
All charts can be accessed, objects can be managed, but there are no chart notifications and there won't be.

That is, it is possible to build visual things.

An interface with no user interaction?

 
Renat Fatkhullin:
All charts are accessible, objects can be managed, but chart notifications are not and will not be.

That is, it is possible to build visual things.

Thank you! Just haven't figured out how to launch kanvas yet.
Can't see the chart. I keep getting an error ERR_CHART_WRONG_ID.

And as I also understood - the debugger and profiling don't work in services? Or is it just temporary?

 

Recently there is a new description (Beta version of MetaTrader 5 build 1995: Economic Calendar, MQL5 programs as services and API for R language)

Terminal: Added a new type of MQL5 programs - Services. They allow you to create your own sources of price data for the terminal - to transmit prices from external systems in real time, as brokers' trade servers do.

In contrast to Expert Advisors, indicators and scripts, services are not tied to a specific chart. They operate in the background mode and start working automatically when the terminal is launched (if they have not been forcibly stopped).

A separate subsection has been added in the Navigator for managing services:





Creating Services
To create a service template, use the corresponding option inthe MQL5 Wizard. Services have one entry pointOnStart, similar to scripts. There you can arrange an endless loop of data receiving and processing usingnetwork functions.

Running services
In order to run several copies of one Expert Advisor or indicator with different parameters, it is enough to apply them to different charts. In this case, separate instances of the program are created, which work independently of each other. Services are not bound to charts, so a separate mechanism for creating instances of them is provided.

Select a service in the navigator and click "Add service" on its context menu. This will open a standard dialog of the MQL5 program, where you can enable/disable trading and access to signals, as well as set parameters.




To start and stop an instance of a service, use its menu. To manage all instances, use the service menu.

 
Comments not relevant to this topic have been moved to "Communicate with developers via Service Desk!".
 
So these are scripts that are not tied to a specific schedule, called by OnStart once when the terminal starts and run in a separate thread?
Reason: