Amend current EA to build in take profit and stop loss in total for the EA in equity

MQL5 전문가 스크립트

작업 종료됨

실행 시간 5 일

명시

Hi there

I have an EA (Send Buy & Sell - attached) that I want to make a change to.

This EA allows you to place 2 trades on the same currency pair in different directions (buy and sell) at the same time. For each of the trades (buy and sell side) you can place a limit and stop in pips.  

I want added to that a stop loss and limit in value / equity / deposit currency for the 2 trades combined. 

 

So I will have the option to choose a stop loss or limit for each transaction as it is currently OR

the option to type in the stop loss in $ (equity) terms for the combined loss for the 2 trades and type in the target combined limit (profit) in $ (equity) terms.

e.g. I choose to type in the stop loss - lets say -$500 and the limit +$750.

Both the long and short trade is closed when the combined profit on the 2 trades reaches +$750 or the combined loss on the 2 trades reaches -$500.

 

Why:

 I want to increase my trading volume but keep my overall leverage low (i.e. buy 20 lots and sell 19 lots = effectively 1 lot in the market). The variable spreads however means I need to close both the long and the short trade at exactly the same time in order to keep my effective leverage low and not risk an overleveraged naked position.  

파일:

응답함

1
개발자 1
등급
(1156)
프로젝트
1462
63%
중재
21
57% / 10%
기한 초과
43
3%
무료
2
개발자 2
등급
(25)
프로젝트
36
17%
중재
14
14% / 57%
기한 초과
3
8%
무료
3
개발자 3
등급
(49)
프로젝트
74
18%
중재
30
17% / 53%
기한 초과
31
42%
무료
4
개발자 4
등급
(647)
프로젝트
1295
67%
중재
84
26% / 49%
기한 초과
338
26%
무료
5
개발자 5
등급
(772)
프로젝트
1039
44%
중재
50
8% / 50%
기한 초과
116
11%
무료
6
개발자 6
등급
(68)
프로젝트
111
26%
중재
17
6% / 71%
기한 초과
15
14%
무료
게재됨: 9 코드

프로젝트 정보

예산
10 - 30 USD
기한
에서 1  5 일