工作已完成
![](https://c.mql5.com/i/avatar/avatar_na2.png)
指定
Hi, good day to you all, i hope you all are safe from the corona virus pandemic? if so thanks and glory be to God. i want to code an ea based on my custom indicator
Here is how the ea should work.
for buy trades
The ea should have two settings in the inputs tab so that whichever settings i will like to use i will simply turn it on (both settings are turned off by default) its only the settings that i will like to use that will be turned on.
Here is settings one,
BUY TRADE
The ea will open a buy trade when the stealth LCD indicator changes from yellow to blue upon candle close, so after it had opened the first buy trade, it will continue to open additional buy trades every 59th second until the indicator changes again from blue to yellow, then all the trades opened in that pair by the ea will be instantly closed upon candle close (exit strategy)
SELL TRADE
The ea will open a sell trade when the stealth LCD indicator changes from blue to yellow upon candle close, so after it had opened the first sell trade, it will continue to open additional sell trades every 59th second until the indicator changes again from yellow to blue then all the trades opened in that pair by the ea will be instantly closed upon candle close (exit strategy)
Settings two
BUY TRADE
The ea will open a buy trade when the stealth LCD indicator changes from yellow to blue upon candle close, so after it had opened the first buy trade, it will only open additional buy trades every time the stealth BUY SELL indicator changes from green to red while stealth LCD indicator must remain blue but if stealth LCD changes from blue to yellow at the same time that stealth BUYSELL turned from green to red then no trade should be opened. Maximum number of trades to be opened using this setting is unlimited. Here is the exit strategy for buy trades, once the stealth LCD changes from blue to yellow then all the trades opened by the ea in that pair will be instantly closed upon candle close.
SELL TRADE
The ea will open a sell trade when the stealth LCD indicator changes from blue to yellow upon candle close, so after it had opened the first sell trade, it will only open additional sell trades every time the stealth BUY SELL indicator changes from red to green while stealth LCD indicator must remain yellow but if stealth LCD changes from yellow to blue at the same time that stealth BUYSELL turned from red to green then no trade should be opened. Maximum number of trades to be opened using this setting is unlimited. Here is the exit strategy for sell trades, once the stealth LCD changes from yellow to blue then all the trades opened by the ea in that pair will be instantly closed upon candle close.
Settings two illustrations
here are the screenshots of illustrations for better understanding,
take a look at buy1.png, the ea should open a buy trade at 06:05 upon candle close
take a look at buy2.png the stealth BUYSELL indicator changed from green to red at 10:00 the very instant the candle closed also the stealth LCD remained blue, so the ea should open an additional buy trade.
take a look at buy3.png the stealth BUYSELL indicator changed from green to red at 10:25 the very instant the candle closed also the stealth LCD remained blue, so the ea should open an additional buy trade.
take a look at exit.png, you will see that the stealth LCD has changed from blue to yellow the very instant the candle closed, so this is an exit signal so all the buy trades opened by the ea in that pair must be instantly closed.
take a look at no trade.png, you will see that the ea should have opened a buy trade at 9:35 because the stealth LCD changed from yellow to blue but at 11:20 the stealth BUYSELL changed from green to red, at the same time that the stealth LCD changed from blue to yellow, so in this case, the ea will not open any additional trade but it will close all open trades in that pair since stealth LCD has already changed from blue to yellow the very instant the candle closed
SELL TRADES
take a look at sell 1, the ea should open a sell trade at 00:45 upon candle close
take a look at sell 2 the stealth BUYSELL indicator changed from red to green at 1:00 the very instant the candle closed also the stealth LCD remained yellow, so the ea should open an additional sell trade.
take a look at sell 3 the stealth BUYSELL indicator changed from red to green at 02:50 the very instant the candle closed also the stealth LCD remained yellow, so the ea should open an additional sell trade.
take a look at sell 4 the stealth BUYSELL indicator changed from red to green at 03:25 the very instant the candle closed also the stealth LCD remained yellow, so the ea should open an additional sell trade.
take a look at sell 5 the stealth BUYSELL indicator changed from red to green at 04:05 the very instant the candle closed also the stealth LCD remained yellow, so the ea should open an additional sell trade.
take a look at sell 6 the stealth BUYSELL indicator changed from red to green at 05:10 the very instant the candle closed also the stealth LCD remained yellow, so the ea should open an additional sell trade.
take a look at sell 7 the stealth BUYSELL indicator changed from red to green at 05:35 the very instant the candle closed also the stealth LCD remained yellow, so the ea should open an additional sell trade.
take a look at exit.png2, you will see that the stealth LCD has changed from yellow to blue at 06:00 the very instant the candle closed, so this is an exit signal so all the sell trades opened by the ea in that pair must be instantly closed.
take a look at no trade 2.png, you will see that the ea should have opened a sell trade at 14:00 because the stealth LCD changed from blue to yellow but at 15:05 the stealth BUYSELL changed from red to green, at the same time that the stealth LCD changed from yellow to blue, so in this case, the ea will not open any additional trade but it will close all open trades in that pair since stealth LCD has already changed from yellow to blue the very instant the candle closed