Termos de Referência
Hi Developers
I would like to develop a very simple Mt4 EA specially to trade GOLD which do the following:
1- At specified time (hh:mm:ss) will open 2 opposite trades with same define lot called trade#1 (spread should be calculated) so Buy and sell trades will open at that time with placing of Sl , Tp and trailing stop.
2- once step 1 over directly the EA will placed 2 pending orders buy stop and sell stop and the entry point will be the stop loss point of the opposite open trades.. each pending orders have fixed sl and tp. (spread must be calculated)
3- let take one scenario .. that we open buy and sell trades and place tp and sl .. then we placed the pending orders .. let assume price move to up and sell sl activated .. so sell order closed with loss and at the same time buy stop must be activated at same point (sell sl point) (spread calculated) and the sell stop order deleted. At same point the stop loss of the Buy order will be move to defined points equal to -10 to -15 pips from entry point.
4- now at this time we have buy order open from beginning with tp and sl move to -10 to -15 pips from entry point and we have trade #2 which activated as pending orders at sell stop loss with defined sl and tp.
5- Trailing stop will work for both trades once its set so each must have separate setting inputs.
6. I need to add variable comments so I can change it at any time and Magic No
example with details are explained on the charts attached
| Vartiable | Value |
| Trade comments | Gold hero (changeable) |
| MagicNumber | 90000 |
| StartHour | 15:00 |
| Startminute | 30 |
| Startsecond | 40 |
| Trade#1 fixed lot | 2 |
| Trade#2 Pending order lot | 1 (if zero no pending orders will placed) |
| Take profit for trade#1 | 100 |
| Take profit for trade#2 | 55 |
| Stop loss for trade#1 | 36 |
| Stoploss for trade#2 | 45 |
| Stop loss move for trade#1 | -10 to 15 pips from entry point |
| 5 | |
| Trailing start for trade#1 | 50 |
| Trailling stop for trade#2 | 5 |
| Trailing start for trade#2 | 30 |