SL removal / reinstatement

MQL4 전문가 스크립트

작업 종료됨

실행 시간 6 일
고객의 피드백
Good developer. Thought I would give him a go. He definitely delivered and was patient throughout the whole process. Will use again. Thanks Reza.

명시

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 

 



응답함

1
개발자 1
등급
(626)
프로젝트
986
47%
중재
33
36% / 36%
기한 초과
98
10%
로드됨
게재됨: 6 코드
2
개발자 2
등급
(117)
프로젝트
138
41%
중재
30
7% / 77%
기한 초과
17
12%
무료
3
개발자 3
등급
(11)
프로젝트
12
0%
중재
2
0% / 50%
기한 초과
1
8%
무료
4
개발자 4
등급
(34)
프로젝트
80
34%
중재
13
31% / 54%
기한 초과
19
24%
무료
5
개발자 5
등급
(97)
프로젝트
121
25%
중재
5
20% / 60%
기한 초과
17
14%
무료

프로젝트 정보

예산
10+ USD
기한
에서 1  5 일