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

Specification

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



Files:

PNG
hedging.png
122.0 Kb

Responded

1
Developer 1
Rating
(17)
Projects
20
5%
Arbitration
6
17% / 17%
Overdue
3
15%
Busy
2
Developer 2
Rating
(173)
Projects
232
45%
Arbitration
17
82% / 12%
Overdue
35
15%
Loaded
3
Developer 3
Rating
(185)
Projects
190
27%
Arbitration
0
Overdue
3
2%
Free
4
Developer 4
Rating
(557)
Projects
924
48%
Arbitration
301
59% / 25%
Overdue
123
13%
Loaded
5
Developer 5
Rating
(229)
Projects
404
33%
Arbitration
52
37% / 40%
Overdue
146
36%
Loaded
6
Developer 6
Rating
(32)
Projects
53
36%
Arbitration
4
25% / 50%
Overdue
6
11%
Loaded
7
Developer 7
Rating
(38)
Projects
41
29%
Arbitration
2
0% / 0%
Overdue
0
Working
8
Developer 8
Rating
(34)
Projects
42
33%
Arbitration
4
0% / 25%
Overdue
8
19%
Working
9
Developer 9
Rating
(3)
Projects
4
25%
Arbitration
1
0% / 0%
Overdue
0
Busy
10
Developer 10
Rating
(40)
Projects
86
13%
Arbitration
30
30% / 47%
Overdue
35
41%
Loaded
11
Developer 11
Rating
(316)
Projects
336
71%
Arbitration
4
100% / 0%
Overdue
1
0%
Working
Similar orders
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

Project information

Budget
50+ USD
VAT (21%): 10.5 USD
Total: 61 USD
For the developer
45 USD
Deadline
from 2 to 4 day(s)

Customer

Placed orders4
Arbitrage count0