EA took long time to execute for scalping strategy
-
Dears, hope your all having a profitable days,
I programmed a very simple EA which is 25 blocks, when testing in demo account, feel like it took more than time than needed, i am not sure if this issue from huge number of lines in the expert source code which is almost 11,600 lines, or its from connection latency, i rented a VPS for a week to test, its better with around 200ms, but still feel like execution should be faster than this.
for example: entry point at certain hour min each day, to sell or buy if the previous candle is bullish or bearish or start, this simple entry took more than 300ms to be executed on VPS connection, also for closing it took more time than that for closing multiple trade with deference between closing each trade not less than 300ms, and this for scalping is not the best scenario
https://fxdreema.com/shared/p69BWM17
What i am asking is this the normal time to process such simple ea?, or should i look for external programmer to simplify number of lines in this EA?
Many thanks in advance
-
I think it has nothing to do with the number of lines, I can only say of my experience on MT4, but I would expect this to happen quickly. EAs never react as promptly as manually pressing a button
-
@jstap , Thanks for the reply, one of the purposes of creating EAs to be more faster than us, if i can act faster than EA hen there is no need for EA

-
@Salmuranda You should defnitely try other VPS. Depending on where your IP provider is located, where your VPS is located and where your broker's server is located, execution time can be even worse than that. This is why me, living in Western Europe I only select Western European VPS and only use Western European broker's servers.
-
@Salmuranda I get what you mean, For example, if you press the x on your platform to close a trade you will get an almost immediate close with the profit you can see, but an EA would send the close to the broker and possibly end up with slippage. But an EA will work when you are too busy to notice what is happening, so you can end up better off.
-
@l-andorrà Totally agree with you, and that's what i did, both broker and VPS are in New York, ICMARKETS have many servers there, so i rent the VPS there, but will try another VPS provider there
Thanks
-
@jstap I got your point, also slippage is another big issue with EAs
-
@Salmuranda
The computations start upon every new tick. So the frequency of tick updates per second also affect the result.Maybe you can check time between tick arrival the actual time of the executed trade.
By the way, I am afraid VPS is often slower than your own PC. You can compare this way as well
-
@sktsec Appreciate your reply, Could you please advise how to check for these measures (time between tick arrival the actual time of the executed trade), I also confirms that the VPS computing capabilities is much less than my own desktop, also I have Fiber connection with 800Mb speed, I need to be sure also if connecting the desktop by cable to the router
Thanks in advance
-
@Salmuranda
In simple case such as once per bar execution, you may use the comment block to print out the tick time using the TimeCurrent() function