Hi,
1) I'm finding that it typically takes about 0.5 to 1.0 seconds to execute a market order on MT4. I don't want to turn this into a review of brokers but am asking if anyone else has been able to achieve anything approaching HFT (eg perhaps sub 0.1s) using MQL5 and MT4?
2) Does MT5 generally have more up to date pricing than MT4, or is only broker dependent?
3) I have a trading system which is very sensitive to trading costs. I have a (not so new) idea. Consider the following example. I am trading an instrument with a bid and an ask of 1.0000 and 1.0004 respectively. If I wanted to buy, I could place a market order at 1.0000 and then to sell a market order at 1.0004 (assuming the market hadn't moved). In that way my transaction costs is 0.0004. However if my broker was ECN, I could have attempted a buy with a limit order or 1.0002 (say). The idea being that hopefully a seller would have reached down and taken my 1.0004 rather than the 1.0000 below it. This is by no means a new idea and is actually the way the spread is often determined. The critical part is that you need to be able to adjust the level of the limit order quickly enough from 1.0002 as the market moves to keep it near the midpoint. This clearly only works if you have a good connection and very up to date prices. Has anyone ever tried to successfully do this in MQL5 with an ECN broker?
Stewart
PS. Please don't mention brokers. I'm interested in hearing from MQL4 programmers to see if they have ever had success doing this, rather than who with.You are already asked one in MQL4 forum https://www.mql5.com/en/forum/141319. Please don't double post in 2 forum.
To answer your question, read this OrderSendAsynchronous https://www.mql5.com/en/docs/trading/ordersendasync
- www.mql5.com
You are already asked one in MQL4 forum https://www.mql5.com/en/forum/141319. Please don't double post in 2 forum.
To answer your question, read this OrderSendAsynchronous https://www.mql5.com/en/docs/trading/ordersendasync
I just test that example found there with my lousy connection. I only test it 3 times using MetaQuotes demo server.
OrderSend() took 1000 ms, 3000 ms, and 8978 ms just to send 1 buy limit,
the OrderSendAsync took 78 ms, 94 ms, 125 ms to send 10 buy limit.
Freak !
Talk about speed.
I just test that example found there with my lousy connection. I only test it 3 times using MetaQuotes demo server.
OrderSend() took 1000 ms, 3000 ms, and 8978 ms just to send 1 buy limit,
the OrderSendAsync took 78 ms, 94 ms, 125 ms to send 10 buy limit.
Freak !
Talk about speed.
I actually didn't read your first post thoroughly.
We can not reduce the spread. We buy at Ask and sell at Bid. If we place pending in between spread - say buy limit, it will still buy at Ask price and when close that buy limit (now its an open buy) we close at Bid.

- www.mql5.com

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi,
1) I'm finding that it typically takes about 0.5 to 1.0 seconds to execute a market order on MT4. I don't want to turn this into a review of brokers but am asking if anyone else has been able to achieve anything approaching HFT (eg perhaps sub 0.1s) using MQL5 and MT4?
2) Does MT5 generally have more up to date pricing than MT4, or is only broker dependent?
3) I have a trading system which is very sensitive to trading costs. I have a (not so new) idea. Consider the following example. I am trading an instrument with a bid and an ask of 1.0000 and 1.0004 respectively. If I wanted to buy, I could place a market order at 1.0000 and then to sell a market order at 1.0004 (assuming the market hadn't moved). In that way my transaction costs is 0.0004. However if my broker was ECN, I could have attempted a buy with a limit order or 1.0002 (say). The idea being that hopefully a seller would have reached down and taken my 1.0004 rather than the 1.0000 below it. This is by no means a new idea and is actually the way the spread is often determined. The critical part is that you need to be able to adjust the level of the limit order quickly enough from 1.0002 as the market moves to keep it near the midpoint. This clearly only works if you have a good connection and very up to date prices. Has anyone ever tried to successfully do this in MQL5 with an ECN broker?
Stewart
PS. Please don't mention brokers. I'm interested in hearing from MQL4 programmers to see if they have ever had success doing this, rather than who with.