Auto Disable AutoTrading in MT4 When Platform........
Can anybody create an indicator or EA such that if attached to the chart will Auto Disable AutoTrading when platform disconnects and when platform reconnects again, it would enable AutoTrading again after x minutes. Is it possible anybody?
have this AutoRefresh Indicator but I want to make it also disable AutoTrading before refreshing the chart. The function is to make the indicator or EA Automatically disable AutoTrading every X minutes and then Auto Refreshes All Open Charts and then finally enable AutoTrading again after X minutes of refresh. Can anybody add this features to this indicator. Thank you.
AutoDisableAutoTrading = true
AutoDisableAutoTradingAfterMinutes = 60 minutes
AutoRefreshAllChartsAfterDisableAutoTrading = true
EnableAutoTradingAfterRefreshMinutes = 2 minutes
have this AutoRefresh Indicator but I want to make it also disable AutoTrading before refreshing the chart. The function is to make the indicator or EA Automatically disable AutoTrading every X minutes and then Auto Refreshes All Open Charts and then finally enable AutoTrading again after X minutes of refresh. Can anybody add this features to this indicator. Thank you.
AutoDisableAutoTrading = true
AutoDisableAutoTradingAfterMinutes = 60 minutes
AutoRefreshAllChartsAfterDisableAutoTrading = true
EnableAutoTradingAfterRefreshMinutes = 2 minutesIt will not work with autorefresh
Autorefresh works only on ticks and when there is no connection there wil be no ticks either
You can use this (it is an indicator) : contol_experts_when_disconnect.mq4
_________________
PS: this is an indicator. Just set the number of seconds to pause after the connection was lost to re-enable EA trading. All the EAs on all the charts are disable/enabled in the case of connection loss or connection regain.
Also, you need to attach it only to one chart. It will manage the auto trade globally
PPS: in metatrader 4 invalid account has the same effect as disconnect
It would work with autorefresh because the connection would still be running while only AutoTrading is disable. And while AutoTrading is disabled, the autorefresh can take place and then AutoTrading is enabled again after x minutes of refresh. This would help others who have very good repainting indicators coded into EAs like FX_FISH_2MA have some peace of mind.
It would work with autorefresh because the connection would still be running while only AutoTrading is disable. And while AutoTrading is disabled, the autorefresh can take place and then AutoTrading is enabled again after x minutes of refresh. This would help others who have very good repainting indicators coded into EAs like FX_FISH_2MA have some peace of mind.
romotly007
Try autorefresh when there is no connection and please give us your observations what happens with autorefresh when there is no connection (apart from never getting to the start or OnCalculate functions, you can not "autorefresh" something when there is no new data coming in like in a case of a no connection - or better told, useless to "autorefresh" data that did not change - the result will always stay the same as long as the connection is lost)
____________________
Anyway, the one I posted will do exactly what you have asked for : once when connection is lost it disables all autotrading and then when connection is regained, it re-enables it back (autotrading of all EAs) after desired period of time
happy trading
You can use this (it is an indicator) : contol_experts_when_disconnect.mq4_________________PS: this is an indicator. Just set the number of seconds to pause after the connection was lost to re-enable EA trading. All the EAs on all the charts are disable/enabled in the case of connection loss or connection regain. Also, you need to attach it only to one chart. It will manage the auto trade globallyPPS: in metatrader 4 invalid account has the same effect as disconnect
Ok thank you mladen let me see how this one works. But I really would love for those variables coded into autorefresh indicator. My connection will not disconnect all the time but my repainting indicator's true value would be distorted after some hours so I need to have the charts refreshed every couple of hours but that should only happen while AutoTrading is disabled and enabled again after the refresh.
This one is with full connection with the autorefresh and the new variables I requested to be added.....not disconnection and reconnection.
This one is with full connection with the autorefresh and the new variables I requested to be added.....not disconnection and reconnection.
Please read the first post of this thread (the one that you posted)
And please read my answer again (all that is needed to know is explained there - I have nothing to add to that answer)
have a nice weekend
But this disconnect indicator would also come in handy in the event my MT4 platform disconnects so I must really thank you this indicator.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Can anybody create an indicator or EA such that if attached to the chart will Auto Disable AutoTrading when platform disconnects and when platform reconnects again, it would enable AutoTrading again after x minutes. Is it possible anybody?