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

Termos de Referência

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



Arquivos anexados:

PNG
hedging.png
122.0 Kb

Respondido

1
Desenvolvedor 1
Classificação
(24)
Projetos
31
16%
Arbitragem
7
29% / 43%
Expirado
4
13%
Trabalhando
2
Desenvolvedor 2
Classificação
(176)
Projetos
236
45%
Arbitragem
17
82% / 12%
Expirado
35
15%
Trabalhando
3
Desenvolvedor 3
Classificação
(202)
Projetos
206
27%
Arbitragem
0
Expirado
3
1%
Livre
4
Desenvolvedor 4
Classificação
(563)
Projetos
932
47%
Arbitragem
302
59% / 25%
Expirado
124
13%
Ocupado
5
Desenvolvedor 5
Classificação
(243)
Projetos
430
34%
Arbitragem
54
37% / 39%
Expirado
157
37%
Carregado
6
Desenvolvedor 6
Classificação
(36)
Projetos
59
34%
Arbitragem
4
25% / 50%
Expirado
6
10%
Trabalhando
7
Desenvolvedor 7
Classificação
(76)
Projetos
85
34%
Arbitragem
3
0% / 0%
Expirado
1
1%
Carregado
8
Desenvolvedor 8
Classificação
(36)
Projetos
44
32%
Arbitragem
6
17% / 33%
Expirado
8
18%
Trabalhando
9
Desenvolvedor 9
Classificação
(9)
Projetos
8
38%
Arbitragem
2
0% / 100%
Expirado
2
25%
Trabalhando
10
Desenvolvedor 10
Classificação
(42)
Projetos
88
14%
Arbitragem
30
30% / 53%
Expirado
36
41%
Trabalhando
11
Desenvolvedor 11
Classificação
(343)
Projetos
362
70%
Arbitragem
4
100% / 0%
Expirado
0
Carregado
Pedidos semelhantes
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

Informações sobre o projeto

Orçamento
50+ USD
IVA (21%): 10.5 USD
Total: 60.5 USD
Desenvolvedor
45 USD
Prazo
de 2 para 4 dias