The is forum is not about MT4 Server.
You should contact Metaquotes for Server support.
robc23:
Hi, I'm installing a new MT4 Server Instance. Before I put it live I'd like to performance test the build, ideally aiming for up to 200 trades/second. To do this I've written a very simple script to generate the trades. However, above a rate of 2/second, MT4 Client becomes unresponsive and dies.
You're not on a server co-located with your broker. It takes many (hundreds) milliseconds to send an order, time for the server to open, and the result received over the internet. During news release, broker response times grow to multiple minutes per trade.
Pay a few $million to your broker, or live with it.
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hi, I'm installing a new MT4 Server Instance. Before I put it live I'd like to performance test the build, ideally aiming for up to 200 trades/second. To do this I've written a very simple script to generate the trades. However, above a rate of 2/second, MT4 Client becomes unresponsive and dies. Have any of you any experience in this space, or can you see any issues in my script that may generate this behaviour?
Here's the script:
void OnStart()
{
string symbol="GBPUSD";
uint ticks1;
uint ticks2;
double rate=3;
uint pause=MathRound(1000/(rate*2));
uint sleep;
while(true)
{
ticks1=GetTickCount();
OrderSend(symbol,OP_BUY,1,Ask,0,0,0,"My Order",0,0,clrAqua);
ticks2=GetTickCount();
sleep=pause-(ticks2-ticks1);
Sleep(sleep);
OrderSelect(0,SELECT_BY_POS);
ticks1=GetTickCount();
OrderClose(OrderTicket(),OrderLots(),Ask,3);
ticks2=GetTickCount();
Sleep(sleep-(ticks2-ticks1));
}
}