How count messages to server (journal)?

 
The metatrader records the number of messages you send to the server (modifying operations, opening, closing, etc.), and i need to generate a code that reads the number of messages and, when reaching a value stipulated by the user, it stops operating and only come back the next day.

Does anyone know how I could do it?

(Click on Journal with right button, and click on view, so you see the numbers of messages send, see the image)
Files:
Messages.PNG  34 kb
 

Maybe a bit late response.

Actual msg are recorded under \logs folder and files are saved per day.

file names are like per day in the format of 

YYYYMMDD.log  

there are 3 types of msg and you may read those log file, and count how many of msg are there.


if your EA generates too many of msg, Brokers might limit your EA as it writes too many to server.

More likely, EA was trying to modify SL/TP every tick and it is overloading server.


Modify your EA as majority of EA msgs are generated by  OrderModify(xxxx) with trailing stop.

Some tricks to reduce msg are: 


* only modify SL/TP when new candle shows up

* only modify SL/TP on certain time interval ( using timer is good way to check and modify )

* only modify SL/TP when certain pip has changed from last, not ever tick

The Fundamentals of Testing in MetaTrader 5
The Fundamentals of Testing in MetaTrader 5
  • www.mql5.com
What are the differences between the three modes of testing in MetaTrader 5, and what should be particularly looked for? How does the testing of an EA, trading simultaneously on multiple instruments, take place? When and how are the indicator values calculated during testing, and how are the events handled? How to synchronize the bars from different instruments during testing in an "open prices only" mode? This article aims to provide answers to these and many other questions.
 
anyone found some utility or way to see count of messages you send to the server (modifying operations, opening, closing, etc.) ? logs don't show count of messages as I see, counting manually from logs is not an option also as there is many messages, there should be some tool as broker sees it so tool for trader also would be helpful. And it's not about sl/tp modification, just a scalping and putting also pending orders can generate many messages, but it should be in normal limits, just some brokers are paranoid about it so would be good to know this message count first hand
 
Terek #: anyone found some utility or way to see count of messages you send to the server (modifying operations, opening, closing, etc.)

Count the calls you send. Ignore the logs.

 
William Roeder #:

Count the calls you send. Ignore the logs.

so how to do it automatically? counting manually hundreds of operations is not an option.
 
Terek #: so how to do it automatically? counting manually hundreds of operations is not an option.
  1. What part of “count the calls you send.” was unclear?
  2. Why is it “not an option?”
 
I'm searching for utility that do it automatically! I think I wrote it clear