Need a Hedging bots that would close all related orders when the sum of all open orders and hedge reaches the stated take profit

İş Gereklilikleri

I need a bot that would buy or sell, then open a hedge if the trade is losing  

Create a hedging Expert Advisor (EA) in MQL5 for MetaTrader 5, which persistently opens counteracting trades based on the outlined logic, with features that manage the initiation and oversight of these trades, adhering to the defined multipliers for position sizes. The EA will terminate all trades once it achieves a collective take profit target.

Design of the Hedging EA:

1. Initialization: Establish initial settings, the base lot size, profit targets, trade type and the multiplier for escalating trades.

  • Two different sort of inputs for multipliers: first multiplier and subsequent multiplier
  • The hedging trades would be pending orders added one by one, created as soon as the previous one is traded,. so we only need to have one pending order at a time

2. Opening Initial Trades: Execute an opening buy or sell order according to the strategy's guidelines.

3. Hedging Logic: - If the first trade is a buy, then the initial hedge will be a sell. following hedges will switch directions (sell after buy, buy after sell), with the lot size of each new hedge doubling that of the one before.

  • If the first trade reaches tp, close and start all over again in the direction of the win
  • If the first trade reaches hedge distance, trigger a new trade in the opposite direction with the first multplier

4. Monitoring for Take Profit: - Constantly track the aggregate of all open trades. - Liquidate all positions when the total profit meets the pre-set take profit threshold.

5. Out of Margin option (Enable/Disable): Average all profitable vs losing trades and close them. - restart hedge on the remaining losing trade as per step 2

6. Need a trade panel for to show all the positions and balances.


Input

  • Lots size
  • Overall take Profit (Amount)
  • Trade type: Buy/Sell
  • Magic Number
  • Hedge Distance (Amount)
  • First Trade Multipliers
  • Subsequent Multipliers
  • <:Display Panel Settings:>

Kindest Regards



Dosyalar:

PNG
hedging.png
122.0 Kb

Yanıtlandı

1
Geliştirici 1
Derecelendirme
(24)
Projeler
31
16%
Arabuluculuk
7
29% / 43%
Süresi dolmuş
4
13%
Çalışıyor
2
Geliştirici 2
Derecelendirme
(176)
Projeler
236
45%
Arabuluculuk
17
82% / 12%
Süresi dolmuş
35
15%
Çalışıyor
3
Geliştirici 3
Derecelendirme
(202)
Projeler
206
27%
Arabuluculuk
0
Süresi dolmuş
3
1%
Serbest
4
Geliştirici 4
Derecelendirme
(563)
Projeler
932
47%
Arabuluculuk
302
59% / 25%
Süresi dolmuş
124
13%
Meşgul
5
Geliştirici 5
Derecelendirme
(243)
Projeler
430
34%
Arabuluculuk
54
37% / 39%
Süresi dolmuş
157
37%
Yüklendi
6
Geliştirici 6
Derecelendirme
(36)
Projeler
59
34%
Arabuluculuk
4
25% / 50%
Süresi dolmuş
6
10%
Çalışıyor
7
Geliştirici 7
Derecelendirme
(76)
Projeler
85
34%
Arabuluculuk
3
0% / 0%
Süresi dolmuş
1
1%
Yüklendi
8
Geliştirici 8
Derecelendirme
(36)
Projeler
44
32%
Arabuluculuk
6
17% / 33%
Süresi dolmuş
8
18%
Çalışıyor
9
Geliştirici 9
Derecelendirme
(9)
Projeler
8
38%
Arabuluculuk
2
0% / 100%
Süresi dolmuş
2
25%
Çalışıyor
10
Geliştirici 10
Derecelendirme
(42)
Projeler
88
14%
Arabuluculuk
30
30% / 53%
Süresi dolmuş
36
41%
Çalışıyor
11
Geliştirici 11
Derecelendirme
(343)
Projeler
362
70%
Arabuluculuk
4
100% / 0%
Süresi dolmuş
0
Yüklendi
Benzer siparişler
I want to decompile an ea file and get the source code, i need it really quick as fast as possible. the file must be delivered alongside the source code
I have an algo that is running on ProRealTime, they have their own language. It is a simple strategy with 5 conditions + SL/TP settings, very basic. I need someone that can convert or just create a functional MT5 algo (EA) from these conditions for me, if you do a good job I have around 10+ more algos that need to be transferred to MT5
Dear Developers, I would have a very simple request. I have a ML model developed in Python for EURUSD daily trading. I would like to backtest it in Meta Trader 5 using the Strategy Tester tool. For that I would need an Expert Advisor program. The input would be a csv file that contains two columns: - dates (going back for a few years on a daily basis) - trading signal (it can have only 2 values, either 1: Buy, or -1
Hi I have the code in pinescript for an indicator that I need done in Ninja Trader 1. The Trading View indicator code needs to be converted into and adapted for Ninja Trader 8 2. An indicator and Automated Trading Strategy needs to be developed. 3. Any parts of the Trading View Indicator that can't be replicated needs to be discussed with me and agreed before excluding. (there should not be any) 4. Trailing stop and
1. The Trading View indicator code needs to be converted into and adapted for Ninja Trader 8 2. An indicator and Automated Trading Strategy needs to be developed. 3. Any parts of the Trading View Indicator that can't be replicated needs to be discussed with me and agreed before excluding. (there should not be any) 4. Trailing stop and Trailing Draw Down options need to be implemented 5. Risk needs to be in % of
Create mt4 ea 50+ USD
To convert the provided MT4 indicator script into an Expert Advisor (EA) and implement prompt functionality for user input, we need to modify the code to handle external parameters and provide a user-friendly interface. Below is the EA code that incorporates prompts for user inputs
I WRITE a code i want to conect this for automatic trading through vps .and als advanced features for this code .i attached afile please watch .and give me perfect ea
Hi Developer, I would like to create the Scalping EA based for Mt4 on the investing.com data https://www.investing.com/currencies/eur-usd-technical EA have timing to adjust time to trade. follow the broker time. From starting time to end time EA have a adjustable Lot size (0.01 incremental to 0.01) EA have a adjustable TP (1pip to 100pip incremental 1pip) EA have a adjustable SL (1pip to 100pip incremental 1pip) EA
Hi I have the code in pinescript for an indicator that I need done in Ninja Trader, I wanted this indicator in NT bcs I chart in NT, and if the indicator could also have been an automated strategy even better. Please confirm that it will be an indicator and Automated Trading Strategy
Hello I need a very simple indicator This indicator should show the highest floating or history drawdown of the account It means that it can display the highest number that the account drawdown to be displayed on the chart in this format max drawdown account(xxxx$$) ...date(00/00/00)time:(00:00) max drawdown currency ..( currency name with max drwadown) . (xxxx$$) date(00/00/00)time:(00:00) thanks

Proje bilgisi

Bütçe
50+ USD
KDV (21%): 10.5 USD
Toplam: 60.5 USD
Geliştirici için
45 USD
Son teslim tarihi
from 2 to 4 gün