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

Техническое задание

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



Файлы:

PNG
hedging.png
122.0 Kb

Откликнулись

1
Разработчик 1
Оценка
(24)
Проекты
31
16%
Арбитраж
7
29% / 43%
Просрочено
4
13%
Работает
2
Разработчик 2
Оценка
(176)
Проекты
236
45%
Арбитраж
17
82% / 12%
Просрочено
35
15%
Работает
3
Разработчик 3
Оценка
(202)
Проекты
206
27%
Арбитраж
0
Просрочено
3
1%
Свободен
4
Разработчик 4
Оценка
(563)
Проекты
932
47%
Арбитраж
302
59% / 25%
Просрочено
124
13%
Занят
5
Разработчик 5
Оценка
(243)
Проекты
430
34%
Арбитраж
54
37% / 39%
Просрочено
157
37%
Загружен
6
Разработчик 6
Оценка
(36)
Проекты
59
34%
Арбитраж
4
25% / 50%
Просрочено
6
10%
Работает
7
Разработчик 7
Оценка
(76)
Проекты
85
34%
Арбитраж
3
0% / 0%
Просрочено
1
1%
Загружен
8
Разработчик 8
Оценка
(36)
Проекты
44
32%
Арбитраж
6
17% / 33%
Просрочено
8
18%
Работает
9
Разработчик 9
Оценка
(9)
Проекты
8
38%
Арбитраж
2
0% / 100%
Просрочено
2
25%
Работает
10
Разработчик 10
Оценка
(42)
Проекты
88
14%
Арбитраж
30
30% / 53%
Просрочено
36
41%
Работает
11
Разработчик 11
Оценка
(343)
Проекты
362
70%
Арбитраж
4
100% / 0%
Просрочено
0
Загружен
Похожие заказы
I want to decompile an ea file and get the source code, i need it really quick as fast as possible. the file must be delivered alongside the source code
I have an algo that is running on ProRealTime, they have their own language. It is a simple strategy with 5 conditions + SL/TP settings, very basic. I need someone that can convert or just create a functional MT5 algo (EA) from these conditions for me, if you do a good job I have around 10+ more algos that need to be transferred to MT5
Dear Developers, I would have a very simple request. I have a ML model developed in Python for EURUSD daily trading. I would like to backtest it in Meta Trader 5 using the Strategy Tester tool. For that I would need an Expert Advisor program. The input would be a csv file that contains two columns: - dates (going back for a few years on a daily basis) - trading signal (it can have only 2 values, either 1: Buy, or -1
Hi I have the code in pinescript for an indicator that I need done in Ninja Trader 1. The Trading View indicator code needs to be converted into and adapted for Ninja Trader 8 2. An indicator and Automated Trading Strategy needs to be developed. 3. Any parts of the Trading View Indicator that can't be replicated needs to be discussed with me and agreed before excluding. (there should not be any) 4. Trailing stop and
1. The Trading View indicator code needs to be converted into and adapted for Ninja Trader 8 2. An indicator and Automated Trading Strategy needs to be developed. 3. Any parts of the Trading View Indicator that can't be replicated needs to be discussed with me and agreed before excluding. (there should not be any) 4. Trailing stop and Trailing Draw Down options need to be implemented 5. Risk needs to be in % of
Create mt4 ea 50+ USD
To convert the provided MT4 indicator script into an Expert Advisor (EA) and implement prompt functionality for user input, we need to modify the code to handle external parameters and provide a user-friendly interface. Below is the EA code that incorporates prompts for user inputs
I WRITE a code i want to conect this for automatic trading through vps .and als advanced features for this code .i attached afile please watch .and give me perfect ea
Hi Developer, I would like to create the Scalping EA based for Mt4 on the investing.com data https://www.investing.com/currencies/eur-usd-technical EA have timing to adjust time to trade. follow the broker time. From starting time to end time EA have a adjustable Lot size (0.01 incremental to 0.01) EA have a adjustable TP (1pip to 100pip incremental 1pip) EA have a adjustable SL (1pip to 100pip incremental 1pip) EA
Hi I have the code in pinescript for an indicator that I need done in Ninja Trader, I wanted this indicator in NT bcs I chart in NT, and if the indicator could also have been an automated strategy even better. Please confirm that it will be an indicator and Automated Trading Strategy
Hello I need a very simple indicator This indicator should show the highest floating or history drawdown of the account It means that it can display the highest number that the account drawdown to be displayed on the chart in this format max drawdown account(xxxx$$) ...date(00/00/00)time:(00:00) max drawdown currency ..( currency name with max drwadown) . (xxxx$$) date(00/00/00)time:(00:00) thanks

Информация о проекте

Бюджет
50+ USD
VAT (21%): 10.5 USD
Итого: 60.5 USD
Исполнителю
45 USD
Сроки выполнения
от 2 до 4 дн.