Inquiry: Can an EA Halt and Resume All Trading Sources?

 

Can an EA be able to completely halt trading from all sources ?


Signals, other EAs, manual trading, etc.


If so, can it resume trading from all the previously halted sources ?


Such EA would have complete power over the account so I don't know if it's possible...

 
Hi is there some out there who would actually talk me through a few things? I need to make 10 trades, with a lot size 0.01, buy or sell in Forex and no "stop loss or take profit" then I will practice lots on a demo, much appreciated if someone can assist. 
 

You can make code conditions to halt the process of trading. I was just writing an article about how to design a kill switch for the EA, and it won't be published unfortunately because apparently I have not written enough pages...

 
Conor Mcnamara #:

You can make code conditions to halt the process of trading. I was just writing an article about how to design a kill switch for the EA, and it won't be published unfortunately because apparently I have not written enough pages...

Hi Conor Mcnamara,

This would be a very interesting article to read ! If you could send me a part of it in DM, would really appreciate it.

From what I understood so far, the simplest way to do such things is to use an EA with DLL imports that would close all open terminals which will result in the complete halt of automated trading (copytrading services and EAs).

However for automatically resuming all the previously halted sources of trading , it is another story. A program/script (in another language than mql4/5) needs to open every previously closed terminals after a specific time period and then attach the right EA to a chart and this EA would resume all the previously halted sources. I feel like this is a bit complex and it might be easier to do it manually.

If you have any opinions or better solutions than this, please let us know.

 
David Pendragon #:

Hi Conor Mcnamara,

This would be a very interesting article to read ! If you could send me a part of it in DM, would really appreciate it.

From what I understood so far, the simplest way to do such things is to use an EA with DLL imports that would close all open terminals which will result in the complete halt of automated trading (copytrading services and EAs).

However for automatically resuming all the previously halted sources of trading , it is another story. A program/script (in another language than mql4/5) needs to open every previously closed terminals after a specific time period and then attach the right EA to a chart and this EA would resume all the previously halted sources. I feel like this is a bit complex and it might be easier to do it manually.

If you have any opinions or better solutions than this, please let us know.

I posted it here now https://www.mql5.com/en/forum/466722  but this is a very simple example of preventing the EA from continuing further under specific conditions and not about continuing operations automatically after a certain period of time


It's all based on conditional logic, in this I discuss how trading can be halted based on the account balance shooting below a user defined threshold. In terms of using a mouse click event to halt the trading, you could get ideas from here 

https://www.mql5.com/en/forum/227507

Programming a Kill Switch in your EA
Programming a Kill Switch in your EA
  • 2024.05.07
  • Conor Mcnamara
  • www.mql5.com
Introduction Anticipating the unforeseen is a cardinal principle in the realm of automated trading...