Edit Your Comment
Fucntions() vs execution speed
Membro Desde Sep 04, 2014
25 postagens
Apr 09, 2016 at 10:34
Membro Desde Sep 04, 2014
25 postagens
Hello programers
Is that a function inside my Ea that I do not call can slow the execution of my Ea ?
Thank you
Is that a function inside my Ea that I do not call can slow the execution of my Ea ?
Thank you
luclevesque17@
Membro Desde Sep 20, 2014
342 postagens
Apr 09, 2016 at 13:08
Membro Desde Sep 20, 2014
342 postagens
The delay any function calling will have compared to how slow MT is, is meaningless. Speed is not one of MT's attributes.
Membro Desde Sep 04, 2014
25 postagens
Apr 10, 2016 at 06:24
Membro Desde Sep 04, 2014
25 postagens
Ok, if I admit MT is slow, could it be faster if I remove functions I don't use?
luclevesque17@
Membro Desde Sep 20, 2014
342 postagens
Apr 10, 2016 at 12:25
Membro Desde Sep 20, 2014
342 postagens
No, the problem is the internet between you and your trades and MT's server, not how fast your computer can do things.
Let's take a big closeout for example, 100 trades. You have to select each trade, close it, wait for the response, then go to the next one, close it, wait for the response and so on. You can do maybe 2 a second. The 1/1000th you use to read a defunct function doesn't even begin to feature.
MT 5 supposedly has an asynchronous mode and only tracks single positions, which in theory solve the time issues, but certainly not to the extent where you need inline functions. And frankly very few brokers use it. There's no demand for it.
Oanda is a bit better, there you can use the API to send an apposing trade, so if you have say 100 trades of 1000 units each you'll send a single order to close 100*1000 and they will do it server side, at their best server speed, which is almost instant, but if it's over more than 1 pair they have a delay written into their closes. So then you're waiting 1 second anyway per pair and you're back to the point where 1/1000th delay doesn't matter.
So unless you're using an enterprise level language and you're plugging directly into the banks with co-hosted servers empty functions simply doesn't matter.
You basically need to be into HFT for it to matter, and that means you have to get out of someone else framework and write your own from scratch and you'll probably have to use the FIX protocol which will create a massive amount of work for you.
Let's take a big closeout for example, 100 trades. You have to select each trade, close it, wait for the response, then go to the next one, close it, wait for the response and so on. You can do maybe 2 a second. The 1/1000th you use to read a defunct function doesn't even begin to feature.
MT 5 supposedly has an asynchronous mode and only tracks single positions, which in theory solve the time issues, but certainly not to the extent where you need inline functions. And frankly very few brokers use it. There's no demand for it.
Oanda is a bit better, there you can use the API to send an apposing trade, so if you have say 100 trades of 1000 units each you'll send a single order to close 100*1000 and they will do it server side, at their best server speed, which is almost instant, but if it's over more than 1 pair they have a delay written into their closes. So then you're waiting 1 second anyway per pair and you're back to the point where 1/1000th delay doesn't matter.
So unless you're using an enterprise level language and you're plugging directly into the banks with co-hosted servers empty functions simply doesn't matter.
You basically need to be into HFT for it to matter, and that means you have to get out of someone else framework and write your own from scratch and you'll probably have to use the FIX protocol which will create a massive amount of work for you.
Membro Desde Sep 20, 2014
342 postagens
Apr 10, 2016 at 12:36
Membro Desde Sep 20, 2014
342 postagens
And I forgot to mention, all price data comes in to your machine as ticks. So any of the MT functions you call reads local data. There is no delay in getting info. So it's not as if you're sitting in functions waiting for data to come in.
So ja, reading empty functions simply doesn't matter.
So ja, reading empty functions simply doesn't matter.
Membro Desde Nov 14, 2015
315 postagens
Apr 10, 2016 at 17:56
Membro Desde Nov 14, 2015
315 postagens
ctrl + alt + delete, if your Metatrader service are using 100% / number of cores on your machine, your EA might have a performance issue, otherwise, its just fine.
Functions not called doesn't have overhead, it use a minuscule amount of ram.
Functions not called doesn't have overhead, it use a minuscule amount of ram.
Membro Desde Jan 05, 2016
1097 postagens
Apr 10, 2016 at 22:25
Membro Desde Jan 05, 2016
1097 postagens
Functions which are not called, do not execute, therefore have no impact upon mt4 execution times in your EA or Indicators.
If it looks too good to be true, it's probably a scam! Let the buyer beware.
Membro Desde Sep 04, 2014
25 postagens
Apr 12, 2016 at 06:18
Membro Desde Sep 04, 2014
25 postagens
Thank you all!
theHand. This is exactly my problem. My EA try to close several trades at once, but it's so long that he forgets that he started work, and some trades will not be closed.
theHand. This is exactly my problem. My EA try to close several trades at once, but it's so long that he forgets that he started work, and some trades will not be closed.
luclevesque17@
Membro Desde Sep 16, 2009
188 postagens
Apr 12, 2016 at 06:52
Membro Desde Sep 16, 2009
188 postagens
MT4 will use ex4 version file. This compiled file use only called functions. So, Any extra functions that are not used in the EA algorithm will not effect.
Try always to show Currency pairs that you are using in Market Watch window. This will reduce the need of MT4 to look for more ticks of data from the server.
Try always to show Currency pairs that you are using in Market Watch window. This will reduce the need of MT4 to look for more ticks of data from the server.
... oshaban ... skype: oshaban27 ...

*Não serão tolerados uso comercial ou spam. O não cumprimento desta regra poderá resultar na exclusão da conta.
Dica: Ao adicionar uma URL de imagem/youtube, você estará automaticamente incorporando-a à sua postagem!
Dica: Digite o símbolo @ para que o nome de um usuário que participe desta discussão seja completado automaticamente.