SL removal / reinstatement

MQL4 Experts Scripts

Job finished

Execution time 6 days
Feedback from customer
Good developer. Thought I would give him a go. He definitely delivered and was patient throughout the whole process. Will use again. Thanks Reza.

Specification

Problem: Spread jumps at role over hitting stops due to massive spreads.

I need a script or EA to:

* runs at a particular time: say hour (23) and Minute (57)

* records current stop losses of all trades (if any) and writes to buffer/file
* removes all stop losses from trades

*script stays active until input time of Hour (00) and minute (05) reads buffer/file and reinstates stop loss values onto the orders previously recorded (if any).
*if SL reinstatement fails, then retries X minutes later.

*Sleeps until activation time above.

 Variables:

Start hour

Start minute

Finish Hour

Finish Minute

SL distance change 

Remove SL: true/false 

Notifications: true/false (sends notifications to MQID device to inform that the SLs have been removed, and then again for when the SLs have been replaced.) 

 

and anything else you can think of?

 ************************

I have realised that you don't need to REMOVE the SL, you can make it very big instead. i.e. It might be easier, to:

if order = sell then, read current SL, add 200 pips to CURRENT SL to obtain the new SL... at finish time, remove 200pips from the new SL to get back to the original distance.

If order = buy then, read current SL, remove 200pips to current SL  to obtain the new SL... at finish time, add back on the 200pips from the new SL to get back to the original distance.

************************ 

The EA/script MUST NOT interfere with the magic numbers associated with the orders that are being modified. 

Thanks 

 



Responded

1
Developer 1
Rating
(624)
Projects
981
47%
Arbitration
32
38% / 34%
Overdue
96
10%
Working
Published: 6 codes
2
Developer 2
Rating
(117)
Projects
138
41%
Arbitration
30
7% / 77%
Overdue
17
12%
Free
3
Developer 3
Rating
(11)
Projects
12
0%
Arbitration
2
0% / 50%
Overdue
1
8%
Free
4
Developer 4
Rating
(34)
Projects
80
34%
Arbitration
13
31% / 54%
Overdue
19
24%
Free
5
Developer 5
Rating
(97)
Projects
121
25%
Arbitration
5
20% / 60%
Overdue
17
14%
Free

Project information

Budget
10+ USD
Deadline
from 1 to 5 day(s)