Auftrag beendet
![](https://c.mql5.com/i/avatar/avatar_na2.png)
Spezifikation
I need you to create an EA which is based only on 1 Moving Average.
It will open a Buy or Sell trade (only one trade at a time)
The strategy is like this-
Whenever the price crosses from below to above the Chosen Moving Average , the EA will open a Buy trade and when the price comes back from above to below the MA, the EA will close the buy trade and open a Sell trade.
If price keeps moving above to below and then again below to above, it will keep closing buy trade and open sell trade and close sell trade and open buy trade.
But I want to do one important thing.
Is it possible that EA does not wait for candle to get closed, It just closes the present trade as soon as the price goes to opposite side of MA at a distance of specific pips (which we decide in the option in EA, say for example we choose 2 pips. So whenever the price goes away 2 pips from the MA in opposite direction, it will close the present trade and open opposite trade. That means EA will not wait for the candle to close, it will work as present candle crosses the MA in opposite direction. I hope that would be possible.)
EA will have different options which can be enabled or disabled.
It will have features which will be as follows-( All options will be optional which can be enabled or disabled)-
Hidden stop loss,
Hidden take profit,
Hidden trailing stop loss,
Time to Trade for EA – Start time and End time (At the end time, there might be a running trade , give me option in the EA, If I want to close this ongoing trade instantly at the mentioned end trading time only or if we disable this option, the ongoing trade will keep running until it will not get the closing signal.)
Overall take profit in 1 day,
(We will mention pips or points.
for example we put value of 100 pips in overall Take profit option. And if today EA reaches to that point where it has overall profit of 100 pips from all trades combination, it will instantly close all running trades for today and stop working for today’s date. Unless we don’t re-start the EA manually once again.which means we reattach it to same chart and start EA again for today’s date)
Trade Instantly- Enable or Disable.
If we choose Disable, After the start of EA, it will open the first new trade once the Price crosses the MA to opposite direction. For example- If at start time of EA , price is above the MA, EA will wait until the price crosses below the MA and it will open first sell trade.
If we enable this option, the EA will open trade at the very start time, it will see if at that time price is above or below MA ,a buy trade will be opened instantly at the start time of EA if price is above the MA and vice versa for sell trade.
Break even point- We will mention the pips in it. After trade moves in profit direction for that much pips , the hidden stop loss will be set at the break even point.