Libraries: Working with sockets in MQL5 - page 2

 
avoitenko:

I have not yet done the transfer of quotes exactly as MT4 does via DDE, because MT4 is an automation server. I do it this way: MT5 is a client, and if you want to know the current_prices, you send a request and get the result. This works for all currency pairs active in the market view window.

You can also send all quotes in one batch in this project. For example, in an Expert Advisor, on a timer every second, receive data and check before sending that the new data is not similar to the already sent data for each currency pair, i.e. a change in the data for Ask or Bid will be considered a new tick.

Timer is not suitable, too much load will be too big !

"...so that the new data will not be similar to the already sent data".

Sometimes, the quote value can be the same as the previous one, determining the activity on the market.

 
gisip:

By timer is not suitable, too much load will be too big !

Apparently, to solve your problem, it is necessary to receive and send to the server data on the OnBookEvent price glass change event.

 
avoitenko:

Apparently, to solve your task, it is necessary to receive and send to the server the data on the OnBookEvent price tumbler change event.

Do you have an example of using OnBookEvent price glass, because I can't understand where to start ?
 
gisip:
Do you have an example of using a glass of OnBookEvent prices, because I can not understand where to start ?
Getting the glass or using it in the TC?
 
Interesting:
Getting a glass or using it in a TC?
Anything that isn't pathetic!
 
gisip:
Anything that is not worthless!

It is better to use glasses in Alpari (there are problems with them here).

You can see an example here
 

hi, very good job!

The mql5.dll  work with EA  mq4?

 Have you example?

 
Look this example for MLQ4 - working with sockets without using DLL.
 

Thanks for this!

but for x64 version u must change my_rand() rutins

//--------------------------------------------------------------------------//
unsigned long long rand64()
//--------------------------------------------------------------------------//
{
        return ( static_cast<unsigned long long>( rand() ) << 32 ) | rand();
}

something like this.

 
Однако, непосредственная работа с функциями этой библиотеки невозможна из-за отсутствия в MQL5 механизма работы с указателями и передачи сложных типов данных в качестве параметров в вызываемые функции DLL.

everything is possible! MQL5 normally passes/receives structures and pointers to them in DLL functions.