Is it possible to create an ea that deactivates "auto trading" per day?
-
I am new and I don't know the platform. I need help, I'm desperate, I want to create an EA that disables autotrading on Friday and activates it on Monday.
help please

-
I don't know how to do that, but I can show you how to program a stop in the EA activity forthat period instead. Would it be valid for you?
-
@l-andorrà said in Is it possible to create an ea that deactivates "auto trading" per day?:
I don't know how to do that, but I can show you how to program a stop in the EA activity forthat period instead. Would it be valid for you?
let me see
-
@lnx28 Are you sure you want to disable auto-trading completely? That means no EA can manage any open positions anymore! What one usually wants to achieve that there are no new trades are opened during that time.
-
@trader-philipps said in Is it possible to create an ea that deactivates "auto trading" per day?:
@lnx28 Are you sure you want to disable auto-trading completely? That means no EA can manage any open positions anymore! What one usually wants to achieve that there are no new trades are opened during that time.
Is that possible trader.philipps? If so, that would better than my solution.
-
@l-andorrà Well, there is a long and a short answer.
Short answer: It's not possible with mql to activate/deactivate Auto-Trading programatically like if one would press the button in ther Terminal.
Long answer: If using an external api (dll) there may be a way. As an example icefx newinfo indicator has an option to disable auto-trading before some news occurs.
So in general there is a way, even if I have no clue how they do so.
As a workaround and if no 3rd party EA are involved, one might use a global variable (fxdreema slang: terminal variable) that might control if an fxdreema built EA is allowed to open new trades. Of course that logic have to be implemented on all EAs (and their instances in MT4).From general perspective I would not recommand disableing autotrading if there are open positions in place (such as icefx newsinfo would do). In case auto-trading is disabled, there is no control over the open position at all. The only "saftey" there'll be is if set SL and TP which are stored on broker side. Hence I'd prefer my EAs built in fxdreema to limit "trading hours" for the means of "allowed to open new positions hours". If there are any open positions in place and the "trading hours" limit is reached, my EA would still manage the trade in order to do things like trailing. Hope that makes sense.
-
I see. Certainly complicated.
