Работа завершена
![](https://c.mql5.com/i/avatar/avatar_na2.png)
![](https://c.mql5.com/i/avatar/avatar_na2.png)
Техническое задание
Need an EA which sell and buy based on the moving average 15 and 30 crossover strategy. And any time frame andy pair.
Once the first order is open then EA will add more trades based on the below mentioned functions on same direction and set new tp of all orders. All order should be closed with same pip profit and Same TP. We will increase the volume for every new order.
Functions to be added:
TP : added manually positive or negative.
Market Gap to add manually. Explained in Example.
Pip Step: How much pip after the last order to open new trade.
...................Example: ............................
Spread is 2 pip fixed. Pip Step: 10 pip TP: 3 pip Volume started: 1 lot market Gap: 8 pip (activated from second order)
EUR/USd
Order 1: open at : 1.1200
Order 2: open at : 1.1190
Order 3: open at : 1.1180
When first order was opened with 1 lot size. its tp was: 1.1203 (3 pip)
Now market move to negative direction and come at 1.1190 .
Bid : 1.11885 Ask: 1.1190
Now EA have to take an other order and it's need to calculate the volume also. Our market Gap is 8 pip . So it should calculate the TP Value on
Current price + Market Gap for both orders + Take Profit for both order (1.1190+ .0008(8 pip) + .0003(3 pip)=1.1201)
and Volume:
Our first order in loss is: 12pip 120$ based on
For New order to calculate volume: Floating Loss/market Gap ( 120/8=15$ /10 = 1.5 )
and TP will be: 1.1190 + 0.0011 = 1.1201 (for both orders)
If it closed it will give 3 pip profit for each order and it will be 45$
Now market move toward 1.1180
Now situation is:
Order 1 in loss = 22 pip 220$
Order 2 in loss= 12 pip 60$
For opening of order 3
New tp should be:
1.1180 + .0008 + .0003 = 1.1191
And volume: 280$/8 = 35$ /10 = 3.5
Now when market move toward 1.1191 it will close all order and give profit of 105$ 3 pip for each order. if market continue in sell it will open an other order based on same calculations.
..........................................
Trailing stop: use or not
Equity risk: %
Starting hour: End Hour : Don't open new trades but need to close already open trades as usual.
magic no: 25222222
Max order limit: 9999
Execution: Chose from every tick or New candle
Close on daily profit limit
Display summary on Chart includes (balance, equity, total lots, expected calculation based on equity and leverage how much will be max lot size,Trend, and any other if you like)
Close all order option whenever required. Close all orders
Stop for XX time 00:00:00 if open the continues order in XX time 00:00:00
Automate pip step based on last XXX bars average move candle low and candel high
Thanks for your interest and sorry for bad english. if you need further information or could not understand strategy let me know.