SERVER-CLIENT SOCKET MECHANISM ISSUE (USING DLL)

 

Hello Sir,I am working on socket programming in MT4 using DLL files.Though I am able to send the orders from server to client ,But I am facing certain issues with the mechanism.They are as follows:

1. If I send the orders from Server to Client within fraction of seconds,then complete data is not received.But, if I send the orders after a second or two,then only client gets the complete data.

2.Whenever I remove the client from the chart,it removes only after removing the Server from the chart.

3.Then after removing both the Server and the Client ,the client places the last received trade again.

 

PLEASE HELP!!!! ME... 

 
How to synchronize data transmission in Sockets????...I am not able to configure whether to make changes in DLL file or In MQL program..!!
 
Prakhar: PLEASE HELP!!!! ME... 
  1. Your code is broken, fix your code.
  2. There are no mind readers here, we can't see your code
 
How can we find the "manually closed order's ticket no." through a program?
 
OrderSelect loop through history
 
there is a condition that,only the new orders are to be closed..the previously opened orders are not to be considered.
Reason: