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

 
The services need to be able to communicate with any programme on any graph. Shared memory of the programmes.
 
Реter Konow:
The services need to be able to communicate with any programme on any graph. Shared program memory.
There are resources through which data can be exchanged now
 
Renat Fatkhullin:
There are resources through which you can exchange data now

The exchange of data of type string is badly needed. A universal type. For any purpose.

One common string array for all programs - ideal solution for fast exchange of any information, without OnChartEvent() or disk load. All asynchronous. Written in one program, read in another.

 

The exchange mechanisms are long overdue.

There are global variables for exchanging string values.

 
Vladimir Pastushak:

Projects are not very user-friendly, there is no way to sort everything into folders. And there is no way to develop code for two platforms at once.

Maybe I don't understand something, of course.

For example, I develop everything through projects. It's even more convenient to exchange code between MQL4/5. It goes without saying, I initially tried to develop everything for both platforms at once. By the way, I can easily compile for 4 in MQL5, though sometimes it may cause a glitch. So it's better to compile them anyway.

P.S. This project is open, you can connect and take a look.
 
Renat Fatkhullin:

We'll think about exchange mechanisms, it's high time.

There are global variables to exchange string values.

datetime  GlobalVariableSet( 
   string  name,      // имя 
   double  value      // устанавлимое значение 
   );

Although there is a solution from@fxsaber, but it's not obvious and you won't find it immediately.

 
Mikhail Dovbakh:

Although there is a solution from@fxsaber but it is not obvious and not immediately found.

Forum on trading, automated trading systems and strategy testing

Libraries: TradeTransactions

fxsaber, 2018.12.17 23:48

You can trade anything through Resources.

// Пример обмена любыми данными (включая строковые массивы).

#include <fxsaber\TradeTransactions\ResourceData.mqh> // https://www.mql5.com/ru/code/22166

#define  PRINT(A) Print(#A + " = " + (string)(A));

void OnStart()
{    
  // Произвольные данные для примера
  string Str[] = {"123", "Hello World!"};
  double Num = 5;
  MqlTick Tick = {0};
  Tick.bid = 1.23456;

  const RESOURCEDATA<uint> Resource; // Ресурс для обмена данными
  CONTAINER<uint> Container;         // Создаем контейнер - все будет храниться в массиве простого типа (в примере выбран uint)
  
  // Заполняем контейнер разными данными
  Container[0] = Str;
  Container[1] = Num;
  Container[2] = Tick;
    
  // Распечатаем типы хранимых в контейнере данных
  for (int i = 0; i < Container.GetAmount(); i++)
    PRINT(Container[i].GetType())

  Resource = Container.Data;  // Отправили данные на обмен
  
  CONTAINER<uint> Container2; // Сюда будем получать данные
  
  Resource.Get(Container2.Data); // Получили данные
      
  // Получим данные в исходном виде
  string Str2[];
  Container[0].Get(Str2);                // Получили массив
  ArrayPrint(Str2);

  PRINT(Container[1].Get<double>())      // Получили число
  PRINT(Container[2].Get<MqlTick>().bid) // Получили структуру  
}

 
Renat Fatkhullin:

There will be neither OnTimer nor OnTick in services. Only OnStart.

This is a special type of program for background looped processes (datafeeds, analytics, external links, etc) and not a replacement for experts.


Beta 1963 is out and you can upgrade via the menu.

You are kind of a master Yoda here, )) I would like to know firsthand what is OnStart and what is the difference between this beast and the same OnTick ?

 
Renat Fatkhullin:

There will be no OnTimer or OnTick in Services. Only OnStart.

This is a special type of software for background looping processes (datafeeds, analytics, external links, etc.), not a replacement for experts.


Beta 1963 is out, you can update through the menu.

And what is the difference between Services and Scripts, apart from the fact that you don't need a separate schedule for them?

 
Renat Fatkhullin:

There will be no OnTimer or OnTick in the services. Only OnStart.

This is a special type of programs for background looped processes(datafeeds, analytics, external links, etc.)

The absence of event model when working with datafeeds looks like some kind of crutch.

As an example of such a crutch, we can consider the current implementation of formula symbols, which are not based on an event model, but on a timer (loop). Hence, there are skipping of ticks.


Earlier it was said about multisymbol OnTick in Services. Why have they abandoned and slashed good ideas like this?