Your ea should go in emergency mode.
Not opening any more positions, and trailing off all that are still opened.
I want to be prepared for when the SH*T hits the FOREX fan.
I have been running a bunch of EA's for a few months now. They have been behaving beautifully but they are only prepared for normal, stable market conditions. Thet are opening and closing trades all the time but at any given moment I usually have 5 or 10 open trades.
I have searched all the usual places and haven't found any solutions.
Basically, if I was watching my bots open and close trades they started behaving VERY differently, I would probably close all trades until further notice.
Any code out there to handle this?
Thanks in advance ...
Danny
My suggestion is using pending orders to control your EAs using the mobile app
First, all your EAs must watch for a Global Variable used a "circuit breaker". TRUE for active trading, FALSE for stop trading.
Second. an EA will watch for specific pending orders:
- if a manual pending order of 111 lots is placed, the circuit breaker GV switches to TRUE
- if a manual pending order of 999 lots is placed, the circuit breaker GV switches to FALSE
- if a manual pending order of 200 lots is placed, all the market orders will be closed.
- if a manual pending order of 300 lots is placed, all the market orders will be closed and pending orders deleted.
Of course, after finding a pending order of the above list, the EA will delete the order right after executing the programmed task.
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
I want to be prepared for when the SH*T hits the FOREX fan.
I have been running a bunch of EA's for a few months now. They have been behaving beautifully but they are only prepared for normal, stable market conditions. Thet are opening and closing trades all the time but at any given moment I usually have 5 or 10 open trades.
I have searched all the usual places and haven't found any solutions.
Basically, if I was watching my bots open and close trades they started behaving VERY differently, I would probably close all trades until further notice.
Any code out there to handle this?
Thanks in advance ...
Danny