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

Spécifications

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



Dossiers :

PNG
hedging.png
122.0 Kb

Répondu

1
Développeur 1
Évaluation
(17)
Projets
20
5%
Arbitrage
6
17% / 17%
En retard
3
15%
Occupé
2
Développeur 2
Évaluation
(173)
Projets
232
45%
Arbitrage
17
82% / 12%
En retard
35
15%
Chargé
3
Développeur 3
Évaluation
(185)
Projets
190
27%
Arbitrage
0
En retard
3
2%
Gratuit
4
Développeur 4
Évaluation
(557)
Projets
924
48%
Arbitrage
301
59% / 25%
En retard
123
13%
Chargé
5
Développeur 5
Évaluation
(229)
Projets
404
33%
Arbitrage
52
37% / 40%
En retard
146
36%
Chargé
6
Développeur 6
Évaluation
(32)
Projets
53
36%
Arbitrage
4
25% / 50%
En retard
6
11%
Chargé
7
Développeur 7
Évaluation
(38)
Projets
41
29%
Arbitrage
2
0% / 0%
En retard
0
Travail
8
Développeur 8
Évaluation
(34)
Projets
42
33%
Arbitrage
4
0% / 25%
En retard
8
19%
Travail
9
Développeur 9
Évaluation
(3)
Projets
4
25%
Arbitrage
1
0% / 0%
En retard
0
Occupé
10
Développeur 10
Évaluation
(40)
Projets
86
13%
Arbitrage
30
30% / 47%
En retard
35
41%
Chargé
11
Développeur 11
Évaluation
(316)
Projets
336
71%
Arbitrage
4
100% / 0%
En retard
1
0%
Travail
Commandes similaires
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
I have this EA that I have build with another developer. I tried backtesting and optimizing it but the test runs too slow. The EA gets instructions from a number of custom indicators to produce orders, I think that's what makes it to slow when testing. I need an experienced MQL4 developer who can dismantle the coded EA and rewrite it in a more logical way, without using the iCustom function. I want everything to be
Are you a coding maestro with a passion for optimizing indicators to blazing speeds? Look no further – I’m in search of a skilled developer to take my indicator to the next level! The Task: I need someone who can dive deep into the code, iron out any pesky errors, and optimize the indicator for lightning-fast responsiveness. Additionally, I require seamless integration of the Zigzag indicator, which currently resides
Dear Developer, I need you to create fxdreema project (EA) to implement a multicurrency math based trading with multiple entry modules. the system will be trading on daily basis with extra confirmation with some math from the higher TF, i use percentage of variation between candle close for a specific candles count like from the start of the day for M5 TF and also there will be some extra math to get the power of the

Informations sur le projet

Budget
50+ USD
TVA (21%): 10.5 USD
Total: 61 USD
Pour le développeur
45 USD
Délais
de 2 à 4 jour(s)

Client

Commandes passées4
Nombre d'arbitrages0