工作已完成
![](https://c.mql5.com/i/avatar/avatar_na2.png)
指定
Rules:
Both EAs should have option to use fixed lot sizes or %risk of account.
Consists of 2 components:
1. Open trade when MACD line crosses the zero line of the macd indicator.
- If MACD line cross the zero line from below, i.e. going up, then it will place a buy order. If it is crossing downwards, i.e. going down, then it will place a sell order.
- it has to wait for the previous candle to close in order to place the trade (i.e. wait for macd to finish painting)
- Stop loss set to parabolic sar, with trail stop loss setting (trail to parabolic sar)
- if macd gives a signal to put an order but the Parabolic sar is in the opposite direction, e.g. macd indicates a buy but the parabolic sar is above the price bar, then it would not execute the trade.
- profit target set 1.5:1 (adjustable input) to the first stop loss.
-option to set trade to breakeven once trade has moved x pips
2. Open trade when MACD cross the signal line below/above zero line and 200 EMA
-for a buy, the MACD line has to cross the signal line from below, and it has to cross below the zero line of the macd. Also, price has to be above the 200 EMA.
-for a sell, the MACD line has to cross the signal line from above, and it has to cross above the zero line of the macd. Also, price has to be below the 200 EMA.
-set stop loss to the parabolic sar, with trail stop loss setting (to parabolic sar)
- profit target set 1.5:1 (adjustable input) to the first stop loss.
- if macd gives a signal to put an order but the Parabolic sar is in the opposite direction, e.g. macd indicates a buy but the parabolic sar is above the price bar, then it would not execute the trade.
It would be great if able to add partial close function to EA, i.e. after hitting 1:1 RR, partial close the trade.
The EA should have a setting to enable/disable each component.
I can provide pictures for better understanding of the system.