Trabajo finalizado
![](https://c.mql5.com/i/avatar/avatar_na2.png)
![](https://c.mql5.com/i/avatar/avatar_na2.png)
Tarea técnica
I need an EA that trades by the current trend defined by ZigZag indicator, close price and two Moving Averages: high and low.
A) Criteria of opening a position:
A.1) Opening a long position: in a uptrend (ZigZag indicator trough is higher than the ones found earlier in the trend), when close prices are operating below the Moving Average (Low), enter when price closes above the Moving Average (Low);
A.2) Opening a short position: in a downtrend (ZigZag indicator peak is lower than the ones found earlier in the trend), when close prices are operating above the Moving Average (High), enter when price closes below the Moving Average (High);
B) Criteria of closing a position:
B.1) Stop Loss, Stop Gain or manually;
C) Defining a trend:
3 trend options: "uptrend", "downtrend" ou "no trend";
Two ways for defining a trend: Manually or ZigZag indicator;
C.1) Uptrend: ZigZag indicator trough is higher than the ones found earlier in the trend;
C.2) Downtrend: ZigZag indicator peak is lower than the ones found earlier in the trend;
C.3) No trend: Others situations.
D) Inputs:
D.1) Lot size;
D.2) Trend definition: Manually or ZigZag; If Manually, 3 options: "uptrend", "downtrend" ou "no trend"
D.3) Stop type: Percentage or Points;
D.4) Stop Loss value;
D.5) Stop Gain value;
D.6) Moving Average type;
D.7) Moving Average period.