multiple orders in tha same milisecond.

 
I have a freind who is programing a scalping ea for me. I need the ea to be able to send a single instruction to open multiple orders at exactley the same time. . For example. I need to open 5 lots of eurusd in 5 individual orders of 1 lot. I can not send the orders 1 after the other as this will take too long.

Is it even possible to do that? .. as my friend says it cant be done and we would have to use a loop that opens the 5 orders. But thats no good as dpeed is of the essence for me.

Thanks in advance!
 

You may send a single order from a single expert. Nevertheless you may run multiple experts concurrently.

I am not sure if the pattern could be implemented within a single terminal (it was not possible, but lately there should have been enabled multiple trading threads, I did not try yet).

But the principle is the same. You have to run multiple slave experts, in my case they run in dedicated instances of the MT4 terminal. You have to message them to open a trade. For messaging, I use a master expert writing to a file and slave experts reading this file, which is fast enough (<1ms).

There are some techniques to notify the slave, but I prefer a primitive loop with Sleep(1), which works fastest for me.

 
not possible on 1 terminal, need to syncronize 2 terminals to do this which can be done using a dll
 
besides with broker issues i doubt you will ever achieve a consistent result
 
oh wait.... milisecond? no not possible at all can only get seconds from the terminal so even if you were to do this via TimeCurrent() then good luck getting 1000th precision from that. forget it and come up with another method of madness.
 
Ok thanks for the advice guys. Wil have a rethink.
 
trevone:
oh wait.... milisecond? no not possible at all can only get seconds from the terminal so even if you were to do this via TimeCurrent() then good luck getting 1000th precision from that. forget it and come up with another method of madness.
Sub-second times have been implemented in MT5, perhaps it will find it's way into the "new" MT4 along with the OOP kitchen sink
 
Denzil859: I need the ea to be able to send a single instruction to open multiple orders at exactley the same time.
  1. There is no single function to open multiple orders. So it can't be done
  2. It takes TIME to open orders. Your round trip time to the broker will be in the 10-100's of milliseconds (assuming no packet is lost, dozens of seconds otherwise.) The time it takes to open depends on the broker and market conditions. During news it can take minutes to open an order. It will NEVER be exact.
  3. You could open multiple pending orders. They will trigger as quick as the server can do it, but again will NEVER be exact (in both time AND price.)
  4. It is unnecessary. Open one. Do partial closes.
 

But it will be better open 10 lots in 10 orders of 1 lot in a bucle waiting the broker accepted, than 10 lots in a only order, to facilitate wait for liquidity. The same when the price get the TP or SL.

I have understand the high frequency trading use this method. :O

Is this correct?

 
VabRus: high frequency trading use this method. :O Is this correct?
Have you given MILLIONS of Dollars to your broker so your machine is co-located (i.e. IN THE SAME ROOM) with their server? No? What makes you think you can do sub-millisecond trades?
 
WHRoeder:
Have you given MILLIONS of Dollars to your broker so your machine is co-located (i.e. IN THE SAME ROOM) with their server? No? What makes you think you can do sub-millisecond trades?


Yes, I know, I can´t open trades in sub-millisecond, maybe open 10 trades 1 second, but open 10 or 100 lots in one order for example in close market not will be more difficult for the broker?