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
(17)
Projetos
20
5%
Arbitragem
6
17% / 17%
Expirado
3
15%
Ocupado
2
Desenvolvedor 2
Classificação
(173)
Projetos
232
45%
Arbitragem
17
82% / 12%
Expirado
35
15%
Carregado
3
Desenvolvedor 3
Classificação
(185)
Projetos
190
27%
Arbitragem
0
Expirado
3
2%
Livre
4
Desenvolvedor 4
Classificação
(557)
Projetos
924
48%
Arbitragem
301
59% / 25%
Expirado
123
13%
Carregado
5
Desenvolvedor 5
Classificação
(229)
Projetos
404
33%
Arbitragem
52
37% / 40%
Expirado
146
36%
Carregado
6
Desenvolvedor 6
Classificação
(32)
Projetos
53
36%
Arbitragem
4
25% / 50%
Expirado
6
11%
Carregado
7
Desenvolvedor 7
Classificação
(38)
Projetos
41
29%
Arbitragem
2
0% / 0%
Expirado
0
Trabalhando
8
Desenvolvedor 8
Classificação
(34)
Projetos
42
33%
Arbitragem
4
0% / 25%
Expirado
8
19%
Trabalhando
9
Desenvolvedor 9
Classificação
(3)
Projetos
4
25%
Arbitragem
1
0% / 0%
Expirado
0
Ocupado
10
Desenvolvedor 10
Classificação
(40)
Projetos
86
13%
Arbitragem
30
30% / 47%
Expirado
35
41%
Carregado
11
Desenvolvedor 11
Classificação
(316)
Projetos
336
71%
Arbitragem
4
100% / 0%
Expirado
1
0%
Trabalhando
Pedidos semelhantes
I have a dropservicing agency (service intermediation) and I'm looking for a professional to configure the Force Value 1.00 indicator in MetaTrader 5 from the Hanteck brokerage. I need the configuration to meet the operating requirements in all markets (forex, stocks, crypto, etc.), allowing day trade operations following the market trend, using the M15 chart and including the Stop Loss functionality." Required
I want a bot developer deriv He has experience and I want a profitable robot, the profit is higher than the loss Or I want someone to sue with me. I have a profitable robot, but I want another robot or to improve another robot I have
Hello developer, I just wanted to know if you have made a profitable Supply and Demand indicator Contact me let discuss and start fully immediately .i will be looking for great developer soon Best regards
1. INTRODUCTION Triple Moving Average Momentum Execution Robot will be to execute trades on Meta Trader 4 or 5 (Developer to tell me which would be better, after understanding the requirement), that modify the position in each currency pair based on the current price, relative to the 3 predefined moving averages. The idea is to identify momentum in a simple way, and then run with it based on where the price is
Where/How to request Oanda retail open positions? I've tried through with a Oanda API and requesting this way; url= " https://api-fxpractice.oanda.com/v3/instruments/AUD_USD/positionBook " but I get result different results (see attached pic). If someone is able to replicate/ make some similar to this indicator, im willing to pay
Create a MT5 EA based on certain strategy creating a proprietary automatic trading strategy for our private investment portfolio. This is a unique opportunity to work on an exclusive project that demands creativity, strategic thinking, and a deep understanding of financial markets. Project Description: We are looking for a developer to design and implement an advanced automatic trading strategy tailored to our
I'm new to this trading system wishing to get something that will guide me through the process of creating a new lifestyle. So I wish to grow my pockets in any circumstance coz life thing ain't easy any more
I like to put 4 input to the EA. symbol 1, symbol 2, symbol 1 lot, symbol 2 lot. When the EA wants to open buy position, close all positions then buy on the symbol 1 and sell on the symbol 2. When the EA wants to open sell position, close all positions then sell on the symbol 1 and buy on the symbol 2. Thank you
Hello everyone, As you can read from the title, I'm looking for a specific program, that based on the trading history of an EA, It is able to guess the entry rules, testing many different indicators, or using machine learning models. I Know that software able to randomly generate strategies, like StrategyQuant exist, but they don't work in reverse. The idea started from an old post here on MQL5, where a user asked
Hi, are you able to convert TOS thinkscript to Tradingview pinescript? I will be looking for great developer to bid for this project https://docs.google.com/document/d/1V8rxS1JG_hfcXqBIChJ9GXdVQ11fxBrlpAxwNA9zhZA/edit The code is already attached to the project Best regards

Informações sobre o projeto

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

Cliente

Pedidos postados4
Número de arbitragens0