工作已完成
![](https://c.mql5.com/i/avatar/avatar_na2.png)
![](https://c.mql5.com/i/avatar/avatar_na2.png)
指定
upside, it should immediately close the sell position and open a buy position at that exact price at the time of the crossover.
This can be translated as follows:
*if (the value of the fast EMA is +1 greater than the value of the slow EMA)
{a buy market order should be executed immediately and the sell position if any should be closed}
*else(if the value of the fast EMA is -1 less than the value of the slow EMA)
{a sell market order should be executed immediately and the buy position if any should be closed}
I should be able to set stop loss and take profit only if i want to, otherwise trades should be automatically closed and opened when the above conditions are met.
It would helpful to have pop up panels and dialog boxes to assign values for the fast and slow EMA periods, their shift, take profit, stop loss etc, every time i attach the EA to a chat.