Latency Monitor EA for MT5 - page 2

 
Icham Aidibe:

Then you should draw using the expert. An EA can retrieve data from an indicator, that's how it works. Sure, it's possible to find a workaround, but it's much more complicated & memory consuming than drawing using a single expert.

I'm trying to avoid having the EA draw using createobject because each line will be an object. A day can have 1k+ objects drawn. Not to mention every update the EA will have to delete/edit current line until next bar comes. Even worse if user changes timeframe. This has to be EA -> Indicator.

Oh well if it was easy someone would already have done.

 

I think this can be done using OnChartEvent and Custom Events...

https://www.mql5.com/en/docs/basis/function/events#onchartevent

 
HUE_HUE:

Hi. I need help to write an EA that monitors latency of the exchange to create/alter orders. For example sometimes it takes 10 seconds to change a Stop Loss and they say it's my internet but I'm sure it is not.

Idea:

Create and change orders that will never be executed and measure how long the exchange takes to apply the changes.

At the same time the EA will ping google. This way I know when the latency problem is because of my internet or the exchange.

I want the EA to draw 2 lines in a indicator: 1) Exchange delay 2) My internet delay


Problem:

I know how to create custom indicators using iCustom() but I don't know how to pass delay values from the EA to the custom indicator.

How can I do this?

Use EventChartCustom(), or Global Variables of the Terminal, or a file or...

 
Alain Verleyen:

Use EventChartCustom(), or Global Variables of the Terminal, or a file or...

Yep that's the way I'm going for. Custom Events. Thank you!

 

IT'S YOUR SERVER.

Click the connection status to see which server you're currently connected to.
  1. Click the connection status in the bottom right corner of MT5.
  2. You will see the list of available servers. Click the server that you wish to connect to.
  3. Once the server has been switched, the system will start to gather data.
Reason: