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
等级
(17)
项目
20
5%
仲裁
6
17% / 17%
逾期
3
15%
繁忙
2
开发者 2
等级
(173)
项目
232
45%
仲裁
17
82% / 12%
逾期
35
15%
已载入
3
开发者 3
等级
(185)
项目
190
27%
仲裁
0
逾期
3
2%
空闲
4
开发者 4
等级
(556)
项目
923
48%
仲裁
301
59% / 25%
逾期
123
13%
已载入
5
开发者 5
等级
(229)
项目
404
33%
仲裁
52
37% / 40%
逾期
146
36%
已载入
6
开发者 6
等级
(32)
项目
53
36%
仲裁
4
25% / 50%
逾期
6
11%
已载入
7
开发者 7
等级
(38)
项目
41
29%
仲裁
2
0% / 0%
逾期
0
工作中
8
开发者 8
等级
(34)
项目
42
33%
仲裁
4
0% / 25%
逾期
8
19%
工作中
9
开发者 9
等级
(3)
项目
4
25%
仲裁
1
0% / 0%
逾期
0
繁忙
10
开发者 10
等级
(40)
项目
86
13%
仲裁
30
30% / 47%
逾期
35
41%
已载入
11
开发者 11
等级
(316)
项目
336
71%
仲裁
4
100% / 0%
逾期
1
0%
工作中
相似订单
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
Attach up to 32 files maximum 16 Mb per upload (.zip .txt .log .mqh .ex5 .mq5 .mq4 .mqproj .ex4 .mt5 .set .tpl .cl .py .sqlite .csv .ini .ipynb .onnx .gif .png .jpg .jpeg)
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
M Empire EA 30+ USD
Fundamental strategy,trade double bottom and double top enters after the break of structure,it must hold the trades for four to six ours and it must also trade London Session and New York Session
Hello dear developers! MT4 EA I want you to help me create a trading robot. I already had an unpleasant experience with a developer who said he would do it for me but didn't know how to do it. Thus he blocked some money from me. Now I want to see who knows how to program such a robot. For this reason, I will initially present only a fragment of this robot. Whoever knows how to correctly program this fragment

项目信息

预算
50+ USD
VAT (21%): 10.5 USD
总计: 61 USD
开发人员
45 USD
截止日期
 2  4 天

客户

所下订单4
仲裁计数0