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
(57)
Projetos
84
26%
Arbitragem
24
13% / 58%
Expirado
7
8%
Trabalhando
2
Desenvolvedor 2
Classificação
(209)
Projetos
281
46%
Arbitragem
27
59% / 37%
Expirado
36
13%
Livre
3
Desenvolvedor 3
Classificação
(248)
Projetos
254
30%
Arbitragem
0
Expirado
3
1%
Livre
Publicou: 2 códigos
4
Desenvolvedor 4
Classificação
(574)
Projetos
945
47%
Arbitragem
309
58% / 27%
Expirado
125
13%
Livre
5
Desenvolvedor 5
Classificação
(306)
Projetos
550
35%
Arbitragem
79
32% / 42%
Expirado
198
36%
Carregado
6
Desenvolvedor 6
Classificação
(39)
Projetos
65
34%
Arbitragem
4
25% / 50%
Expirado
9
14%
Trabalhando
7
Desenvolvedor 7
Classificação
(333)
Projetos
401
52%
Arbitragem
20
55% / 15%
Expirado
29
7%
Carregado
8
Desenvolvedor 8
Classificação
(44)
Projetos
53
38%
Arbitragem
8
13% / 38%
Expirado
8
15%
Trabalhando
9
Desenvolvedor 9
Classificação
(12)
Projetos
9
33%
Arbitragem
11
0% / 100%
Expirado
2
22%
Livre
10
Desenvolvedor 10
Classificação
(45)
Projetos
91
13%
Arbitragem
34
26% / 59%
Expirado
37
41%
Livre
11
Desenvolvedor 11
Classificação
(462)
Projetos
483
75%
Arbitragem
6
67% / 0%
Expirado
0
Trabalhando
Pedidos semelhantes
1. Goal I want a MetaTrader 5 Expert Advisor that trades a simple Supertrend trend‑following idea, but with professional‑grade risk management and filters. It should be robust enough for real money on instruments like XAUUSD and GBP pairs, using small, consistent risk per trade rather than martingale or grid. 2. Strategy Logic Indicators (I will supply the .mq5 files if needed): Supertrend (ATR‑based), with
Hi developers, I need someone to help me create a simple EA with my indicators and trading plan... I will give you all parameters and you help me create... 2 moving averages, one candle pattern
Please a need a very good expert for this jou I want to create 2 robot one a trade manager Perfect — here’s a clean, professional order description you can post directly to an EA freelancer (MQL5). I’ve written it so it’s clear, serious, and attractive to skilled developers 👌 MQL5 Trade Manager EA – Development Request I am looking for an experienced MQL5 developer to build a robust Trade Manager Expert Advisor for
Henryy999 30 - 3000 USD
The Ai robot must help me with forex and I don't have money soon can the Ai robot give me some money and I will pay it back if the Ai robot does a good job making me rich
Project Title: MT5 Algo Trading EA (Single Strategy + License Panel + Ownership + Manual Trade) --- Project Description I am looking for an experienced MT5 (MQL5) developer to create a clean, stable and professional Algo Trading EA for my company and future clients. This is a long-term business project, not a one-time personal EA. --- 1. Strategy Requirements - Only 1 single trading strategy - No martingale - No grid
I am looking for an experienced StrategyQuant X (SQX) developer to build a reusable trading template , not a single strategy. ⚠️ Please do NOT apply unless you actively use StrategyQuant X and have access to it. This project cannot be completed without SQX. 1. Session and Time Filters Trading restricted to fixed GMT sessions per index Sessions must convert correctly to broker server time and remain correct through
Is there someone who coded the PipJuice indicator? Here is the link: https://www.pipjuice.io/ Unfortunately, I don‘t have access to the indicator or the code. If someone have it please send me some screenshots
Strategy Development: Suggest a high-probability trading strategy based on Technical Analysis (using indicators like RSI, MACD, or Price Action). Risk Management: Explain how to calculate position sizing so I don't lose more than 1-2% of my capital per trade. Market Analysis: Teach me how to identify Support and Resistance levels and how to spot a trend reversal. Psychology: Give me 5 golden rules to maintain
A Grid EA with a hedge that open trades on a percentage based on whats is opened on the other side, closes losing trades with current profits made and utilizes a grid trading strategy combined with hedging technique to mitigate risk and potentially lock in profits. It involves placing buy and sell orders at predetermined price intervals, forming a grid. When a trade within the grid moves against the initial
MQL5 Expert Advisor Development (MT5) I need a professional MQL5 developer to create a custom Expert Advisor (EA) for MetaTrader 5 with high accuracy, low drawdown, and fast execution . 🔹 Strategy Requirements: Timeframe: Scalping-friendly (M1 / M5) Indicators Used: EMA 9 EMA 12 EMA 21 VWAP (as a trend filter) RSI (for trade confirmation) 🔹 Trade Logic: Buy and Sell entries based on EMA crossover + VWAP direction

Informações sobre o projeto

Orçamento
50+ USD
Prazo
de 2 para 4 dias