OrderModify() much slower than manual change of orders - page 2

 

And here is another log. It additionally measures the time for each execution of OrderModify(). As one can see, there is no delay between the Click (visual execution, logged as "SL Clicked"), - not one millisecond - and one can see, and the the start of the actual execution of OrderModify() and it is not waiting for a tick, cause it happens during OnChartEvent. 

But the log shows an execution time between 600! milliseconds (first execution) and and average of 200 milliseconds for the following executions. The measurement is located directly around OrderModify(), there is no other code between. As estimated before, the total time is almost round about 2 seconds for five SLs.

Log #3

and here is another one, more than 5 seconds for 5 TPs ... see for yourself:

Log #5 

 

OK, I give the answer myself and for the rest of the world, which is going to search for an answer too.

This huge delay was caused by the MetaQuotes Demo-Account-Server.  After I´ve tested it on a live-acount, the execution time went down to <>70 msecs per order, which is totally acceptable.

Thank you anyway

Doerk 

Log #5 

 
Doerk: Here is the log. As one can see, the initial tick happens at 16:49:08, afterwards five orders are modified "within" this tick. The log says, that it takes almost 2 seconds, but the orders on the chart take 5 seconds til I can see the updated SL lines, actually til tick no 21. Anyway, 2 seconds are too much too.
  1. Your log shows a new tick came in and you make 5 server calls over the network that took (49:09.672 - 49:08.124 =1.548 seconds) 300 MS round trip (including server processing.)
  2. You're not going to get quicker unless you spend a million to get a co-located server. Server processing time you can do nothing about.
  3. During news releases, server processing time can go up from MS to seconds to minutes.
 
Yes, you´re right, I´ve been trading with it since yesterday on a live account, the average is somewhere between 50ms and 100ms, this is ok for a ping of <>30ms. I think a VPS located in the area of the server will speed up this once again. And, as I wrote, these delays occurred only on the demo server, the last log with the live account shows a much better timing with 203 msecs for 3 orders. The roundtrip within the EA is always <1 msec. 
Reason: