Keep Alive Command Connection - page 2

 

"...and disconnects after 30 seconds inactivity."
"I have never noticed that. You sure u got your facts right?"

Yes I have my facts right :-), you don't notice these things, unless you measure the communication delays in milliseconds and actually spy on the TCP/IP packets with WIRESHARK.


orderclose with bad ticket number does'nt work, the client checks the ticket # before contacting the server.

Sending unrealistic buylimit orders work, but the problem is that they accumulate in the order history and I think the broker may have problem with that.

ok, it looks like there's no solution for my problem :-(

 

robertvo,

I am not quite sure what the problem is, but it does seem like an unusual one. The ONLY reference I could find to establishing a connection with the server provides the following quote(I think it refers to getting the interactive thread going) :-

If the program has formed a correct trade request, the client terminal sends this request to the server; the next event will be Event 5 (the moment of t5) - the server will receive the trade request. The connection between the client terminal and the server is established via Internet, so the time spent on sending of the trade request to the server (time interval between t3 and t5) is completely dependent on the connection quality. For a good-quality connection, this period of time can be approximately 5 to 10 ms, whereas it can be measured in whole seconds at bad connection.

The article can be found here :- https://book.mql4.com/trading/common

I would suggest the following :-

  • Have you tried a different broker - does the problem persist?
  • Have you tried an alternative connection ie through a VPS - does the problem persist?
  • If the above 2 do not solve your problem, you don't have to send unrealistic buy limit orders, you could have one order and simply modify one of the parameters every so often.
 
robertvo:

"...and disconnects after 30 seconds inactivity."
"I have never noticed that. You sure u got your facts right?"

Yes I have my facts right :-), you don't notice these things, unless you measure the communication delays in milliseconds and actually spy on the TCP/IP packets with WIRESHARK.

What's your latency to the server? 700ms is extremely slow... Perhaps a better strategy would be to try to lower this figure.

 
robertvo:
Sending unrealistic buylimit orders work, but the problem is that they accumulate in the order history
What about a market buy 100 pips below the current price while setting the slippage to zero? These should be rejected by the server and not show up in the history.
 
gordon:

What's your latency to the server? 700ms is extremely slow...

Establishing an SSL connection takes more than one round trip: http://www.imperialviolet.org/2010/06/25/overclocking-ssl.html (assuming that they really use SSL or something similar. TCP alone already consumes one round trip and everything else has to run on top of it)
 
7bit:
Establishing an SSL connection takes more than one round trip: http://www.imperialviolet.org/2010/06/25/overclocking-ssl.html (assuming that they really use SSL or something similar. TCP alone already consumes one round trip and everything else has to run on top of it)
Sure, but if your latency to the server is <10 ms (which is easy to achieve with a VPS/DS near your broker), then that time would fall to a negligible range (it would be much smaller than fill time). IMHO, it makes more sense to minimize this time than what the OP proposes.