Trabalho concluído
![](https://c.mql5.com/i/avatar/avatar_na2.png)
![](https://c.mql5.com/i/avatar/avatar_na2.png)
Termos de Referência
The order will consist out of 2 similar sub projects all in separate EA.
Project 1.
Conditions:
A signal to open a position if the following conditions is fulfilled:
For BUY:
The fast MA value on the last formed bar is higher than the one of the slow MA.
For SELL:
The fast MA value on the last formed bar is lower than that of the slow MA.
To CLOSE position:
For BUY position will be when the fast MA last formed bar is lower than the slow MA.
For SELL position will be when the fast MA last bar formed is higher than the slow MA.
Or Stoploss/takeprofit/Trailingstop functions are triggered
But important: when a buy/sell position is closed due to MA that crosses a opposite position should be taken.
For example a BUY position is opened and then fast MA crosses slow MA downwards the BUY position should be closed on the last formed
bar that crosses the slow MA and a new SELL position should be created on the last formed bar that crosses the slow MA.
The following input parameters should be present:
Trade settings
- RiskPercentage- The percentage of free margin to risk in a trade.
- TakeProfit- The fixed take profit value in points. If 0 then no take profit will be set.
- StopLoss- The fixed stop loss value in points. If 0 then no stop loss will be set.
Settings for trailing stop;
- AllowTrailingStop- This setting must be set to true if trailing stop is to activate.
- TrailDistance- The trailing stop will be this distance in points away from the price.
- TrailTrigger- The trailing stop will only start when the trade is at least this number of points in profit.
- TrailStep- After the trailing is active, a new modification will only occur when there is at least a change of this points. This prevents too many trade modifications on every little price change and hence saves on memory usage.
Fast MA settings:
- Ma1period- Period value for first MA.
- Ma1shift- Shift value for first MA.
- Ma1method- Moving average method. Set 0 for simple, 1 for exponential, 2 for smoothed and 3 for linear weighted.
- Ma1appliedPrice- Moving average applied price. Set 0 for close price, 1 for open price, 2 for maximum price, 3 for minimum price, 4 for median price, 5 for typical price and 6 for weighted close price.
Slow MA settings:
- Ma2period- Period value for second MA.
- Ma2shift- Shift value for second MA.
- Ma2method- Moving average method. Set 0 for simple, 1 for exponential, 2 for smoothed and 3 for linear weighted.
- Ma2appliedPrice- Moving average applied price. Set 0 for close price, 1 for open price, 2 for maximum price, 3 for minimum price, 4 for median price, 5 for typical price and 6 for weighted close price.
The EA should be able to trade all currency pairs (major,minor and exotic) +Indices (DE30, AUS200, EU50, F40, UK100)+ Metals(all availible on MT5)+Energies(UK +US oil) + US indices(US Tech, US 500, US30)+all US, UK and EU
shares available on Metatrader 5.
I would also have possession of the code.
Project 2
Would be identical to project 1 except for:
Consist of push notifications only to notify when a BUY or SELL position should be opened or closed.
Should not open or close buy or sell positions but rather send notification via email or other platform to user notifying that a position should be opened(BUY/SELL) or closed.
Message should be in following format:
Position size: X
Symbol() for example usdgbp
Either BUY/SELL/CLOSE