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
等级
(62)
项目
90
29%
仲裁
24
13% / 58%
逾期
7
8%
工作中
2
开发者 2
等级
(211)
项目
284
46%
仲裁
27
59% / 37%
逾期
36
13%
工作中
3
开发者 3
等级
(258)
项目
265
29%
仲裁
0
逾期
3
1%
空闲
发布者: 2 代码
4
开发者 4
等级
(574)
项目
945
47%
仲裁
309
58% / 27%
逾期
125
13%
空闲
5
开发者 5
等级
(317)
项目
564
35%
仲裁
81
31% / 44%
逾期
204
36%
空闲
6
开发者 6
等级
(39)
项目
65
34%
仲裁
4
25% / 50%
逾期
9
14%
工作中
7
开发者 7
等级
(363)
项目
436
54%
仲裁
22
50% / 14%
逾期
30
7%
繁忙
8
开发者 8
等级
(44)
项目
53
38%
仲裁
8
13% / 38%
逾期
8
15%
空闲
9
开发者 9
等级
(12)
项目
9
33%
仲裁
11
0% / 100%
逾期
2
22%
空闲
10
开发者 10
等级
(45)
项目
91
13%
仲裁
34
26% / 59%
逾期
37
41%
空闲
11
开发者 11
等级
(471)
项目
489
75%
仲裁
6
67% / 17%
逾期
0
工作中
相似订单
Noganda EA 30+ USD
*MQL5 Bot: “HH_HL_Simple.mq5”* Copy → Paste → Compile in MetaEditor. //+------------------------------------------------------------------+ //| HH_HL_Simple.mq5 | //| WARNING: FOR EDUCATION/DEMO ONLY. YOU CAN LOSE MONEY. | //| @kasii_trader_nela - Learn first, trade later | //+------------------------------------------------------------------+ #property copyright "Educational use only" #property strict #include
I need a simple bot for opening range. Simple Entry / Exit rules, to be able to customize the timeframe, time zone (entry candle) and other normal settings like size, etc
Nyctrad1 30+ USD
Free link free land free land free land free land free free land free land free things free land free land free land free land free land free land free land free Finch I will do it
Title Professional AI Automation Trading Bot for Forex & Crypto Solution Language Python (preferred) or MQL5 depending on integration requirements. Categories Expert Advisor (EA) for MetaTrader 5 Automated trading strategies AI/ML-based signal generation Risk management automation Required Skills Strong knowledge of MQL5/Python Experience with MetaTrader API integration Machine learning model deployment
BullyMax Pro 30+ USD
"Act as an expert MQL5 algorithmic trading developer. I want you to create a profitable and efficient Expert Advisor for MetaTrader 5. Do not write the code yet; read the following trading rules, analyze them, and ask me any clarifying questions if needed. Timeframe: [e.g.15 minutes Chart] Entry Logic: [e.g.MACD + RSI + REVERSAL PRICE ACTION. Enter buy when Macd line crosses above the signal line ,RSI above 30 and
I want an indicator that displays the risk reward ratio of each chart candle as a sub window histogram. If the candle closes above the open the histogram displays a green bar above zero the size of which is dependant on the size of the RRR. If the candle closes below the open the histogram displays a red bar below zero the size of which is dependant on the size of the RRR. My attempt that does not work is attached
Hi, I am looking for an experienced MQL5 developer to modify an existing, fully functional MetaTrader 5 Expert Advisor (Source code .mq5 Version 2.62 will be provided). Brief Overview of the EA: It executes trades based on 4 custom Supply/Demand levels (R1, R2, S1, S2) which are inputted manually . It uses two custom indicators for confirmation: SPA (Price Action filter) and AMG (Volume/Momentum filter). The code
I really like this platform. I am interested in trading and need funds for it. I enjoy both crypto and forex trading.I"really appreciate this platform. I am keen on trading and am looking for trading funds. I enjoy trading in both cryptocurrency and forex."
Titan Quantum Algo Engine V2 is an advanced MT5 Expert Advisor designed to identify high-probability market opportunities using trend analysis, breakout detection, and intelligent risk management. The EA automatically executes trades, manages stop-loss and take-profit levels, and helps traders maintain disciplined trading with optimized entry and exit strategies
The striker robot 30 - 2000 USD
I would like a trend and pullback strategy for the robot timeframe:15 minutes(m15) or 1 hour(h1) indicators:50 EMA (Exponential Moving Average)/200 EMA/RSI (14) BUY SET UP 1.Confirm The Trend .50 EMA must be above 200 EMA .Price must be above both EMAs 2.Wait for a pullback .Do not buy when the price shoots up. .Wait for the price to come back near the 50 EMA 3.Confirm entry .ENTER BUY WHEN: .A bullish candlestick

项目信息

预算
50+ USD
截止日期
 2  4 天