Tâche terminée
![](https://c.mql5.com/i/avatar/avatar_na2.png)
![](https://c.mql5.com/i/avatar/avatar_na2.png)
Spécifications
I need a new MT4 EA that increases SL for every open trade at given "Start Time" time + returns original SL values after given "End Time" time.
Please read instructions carefully as already two coders have failed at this job. This is simple job, but EA must be able to handle 1-20 orders at given time (usually at 23:57) and return their values at given time (usually at next day at 00:15). Any new orders opened after Start time (23:57) must not be touched at the END (00:15) + Orders with no SL (SL 0.00000) must not be touched at any stage. Order with no SL can be discarded on every stage.
Detailed description from typical situation EA has to handle:
My suggestion parameters needed.
SL change = xxx (default 100 points)
Trade 2345 SELL GBP/USD SL 1.22000 -> SL 122100 (save original order number + SL value so we can return it later)
Trade 3456 BUY EUR/USD SL 0.0000 -> DO NOT TOUCH
---------------------------------------------------------
Between START and END 23:57 - 00:15 1 trade opened.
Trade 00:11:00 4567 Buy EUR/USD SL 1.06500 (This trade happens at 00:11 so it is after Start, but before END. DO NOT TOUCH THIS OR CHANGE THIS AT THE END)
--------------------------------------------------------------
Trade 2345 SELL GBP/USD SL 1.22100 -> SL 122000 (Trade still exist change back to original value)
Trade 3456 BUY EUR/USD SL 0.0000 -> SL 0.00000 (NO SL do not touch)
Trade 4567 Buy EUR/USD SL 1.06500 (Do not touch this!!! This was opened after 23:57 START )
If there is other trades opened after 23:57 do not touch them! If trade is closed just move to next trade!
My Suggestion here is that you save Order number for every changed SL at START. Then you compare Order numbers for open orders at the END. If order number has not been changed at START you do no change the order at the end. This is just my suggestion, but you can do some other solution if you wish so. I only care about working solution!