Tâche terminée
![](https://c.mql5.com/i/avatar/avatar_na2.png)
![](https://c.mql5.com/i/avatar/avatar_na2.png)
Spécifications
Hello.
I have an ea that places 2 pending orders - 1 buy stop and 1 sell stop at a certain time.
There are a few things i want changed and fixed:
- The breakeven doesnt sometimes work :
04:29:58.331 '168456': order was opened : #32326447 buy stop 4.00 AUDUSD-Pro at 0.93961 sl: 0.93841 tp: 0.94611
04:29:58.331 '168456': pending order sell stop 4.00 AUDUSD-Pro at 0.93763 sl: 0.93883 tp: 0.93113
04:29:58.487 '168456': order was opened : #32326448 sell stop 4.00 AUDUSD-Pro at 0.93763 sl: 0.93883 tp: 0.93113
04:30:04.243 '168456': modify order #32326448 sell 4.00 AUDUSD-Pro at 0.93754 sl: 0.93883 tp: 0.93113 -> sl: 0.93874 tp: 0.93104
04:30:04.415 '168456': order #32326448 sell 4.00 AUDUSD-Pro at 0.93754 was modified -> sl: 0.93874 tp: 0.93104
04:30:05.211 '168456': modify order #32326448 sell 4.00 AUDUSD-Pro at 0.93754 sl: 0.93874 tp: 0.93104 -> sl: 0.93714 tp: 0.93104
04:30:05.398 '168456': order #32326448 sell 4.00 AUDUSD-Pro at 0.93754 was modified -> sl: 0.93714 tp: 0.93104
04:30:05.398 '168456': modify order #32326448 sell 4.00 AUDUSD-Pro at 0.93754 sl: 0.93714 tp: 0.93104 -> sl: 0.93874 tp: 0.93104
04:30:05.554 '168456': order #32326448 sell 4.00 AUDUSD-Pro at 0.93754 was modified -> sl: 0.93874 tp: 0.93104
04:30:15.210 '168456': delete pending order #32326447 buy stop 4.00 AUDUSD-Pro at 0.93961 sl: 0.93841 tp: 0.94611
04:30:15.351 '168456': pending order #32326447 was deleted
and
11:30:24.138 '168456': modify order #32738475 buy 2.30 GBPUSD-Pro at 1.71124 sl: 1.71004 tp: 1.71674 -> sl: 1.71164 tp: 1.71674
11:30:24.304 '168456': order #32738475 buy 2.30 GBPUSD-Pro at 1.71124 was modified -> sl: 1.71164 tp: 1.71674
11:30:24.304 '168456': modify order #32738475 buy 2.30 GBPUSD-Pro at 1.71124 sl: 1.71164 tp: 1.71674 -> sl: 1.71004 tp: 1.71674
11:30:24.478 '168456': order #32738475 buy 2.30 GBPUSD-Pro at 1.71124 was modified -> sl: 1.71004 tp: 1.71674
As you can see the sl is set back to the original one, BUT, sometimes it does work properly so I have no idea how this can be explained.
- I want the other opened pending order to be closed immediately when the other is triggered. For example - the buy stop gets hit - the sell stop is deleted.
- I want the EA to open the opposite trade when the initial stop loss is hit, with the lot size 80% of the order that got stopped, with SL at the stopped out orders open price. For example - EURUSD buy stop gets hit at 1.3000, 10 lots. SL at 1.2990 gets hit, then immediately a sell order is opened, 0.80 lots, SL at 1.3000. This function should have an on/off switch.
- In the time somewhere between 00:00 - 03:00 the ea's timing and dating gets kinda messed up, I'm adding a screenshot, you'll understand what I mean if you take a closer look at the date and time.
Nothing else of the EA should be changed, there a quite a few modications to it, so I hope that nothing else gets messed up.
I will provide EA when everything is setlled.