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%
Loaded
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
(555)
Projects
922
48%
Arbitration
300
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
(31)
Projects
51
37%
Arbitration
4
25% / 50%
Overdue
6
12%
Busy
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
(315)
Projects
335
71%
Arbitration
4
100% / 0%
Overdue
1
0%
Working
Similar orders
I'm looking for a profitable EA at least 5-10% per month profits . No Grid, Hedging, Martingle trading. 1 trade per pair as much as possible to avoid violations. Willing to give live demo backtest to test the ea performance . I'm willing to pay handsome amount for a premium quality EA. You can name your price if you have proven track record of your ea being used for prop firms and has been profitable for a long
Required an expert advisor for MT5 plateform based on Moving Average, with some cross over and retest settings, including some buttons on chart window. There are some conditional settings with this EA at different levels. You may offer your bid and I will share the complete strategy after, and will share a video explanation for this moving average trading system. Happy Bidding
I needed one Simple Following FIFO Rule, No Hedging, with panel box Grid based MT4 EA. only for really good understandable, giving time and high professional good quality Developer. I’ll sent Everything in detail, we can do good conversation through message step by step
Hi I have an indicator that I use within ThinkorSwim that helps me determine when a bullish or bearish trend is reversing and I would like to convert the indicator over to Ninja Trader 8. I've added a text file with the code of the indicator for you to review and provide me with an estimate for the work. I'm looking forward to hearing from you about the statement of work. Kind regards
Hello, My request is as follows: Write an MT4 robot (EA MT4) that automatically adds indicators and updates values in the indicator's input and then runs that indicator. Do not use chart templates. Do not use auto click. Thank! Exemple: MACD
I hope this message finds you well. I am in search of a FREE skilled developer to transform three indicators into a fully functional trading robot. These indicators consist of two MACD indicators, each displaying two colors (red and green), along with a RED arrow signal. Here are the specific requirements for the project: The robot should execute trades only when the RED arrow signal appears and both MACD indicators
Forex Advanced Risk Management : With the new Fixed Lot and Risk Percentage modes, tailor your trading to align with your risk tolerance. The system now allows you to define your risk down to minute detail, ensuring that each trade is in harmony with your financial strategy. Dynamic Trend Configuration : Version 2.0 comes with a refined algorithm selection that seamlessly adapts to market trends. Whether you choose a
I have Trading View pinescript indicator that I would like converting to an MT4 indicator, and i want it to be working in MT4 exactly the way it works in tradingview must work on any timeframe and without bugs, if you have the knowledge of the platform programming language and can make the conversion possible please kindly bid for the job. Sorry, forgot to add I need an alert added to the indicator when price reaches
Hi, I am looking for a scalping bot, that will have below criteria: 1. Take a position in the direction of the market with 1 STANDARD LOT. 2. Wait for 125 seconds after entering the position. 3. Exit the position when the position shows $10 profit. 4. Scan multiple leading currencies for such setups. 5. More than 5 positions should not be open at a time. 6. Exit the position if the floating loss exceeds $100. 7
Hello I am looking for a developer to help me do modification on my custom ninjatrader 8 strategy and also backtest it in other to work perfectly your expertise is highly needed for this project Kindly reach out to me and let get started on the project Thanks

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