Use the Profits from other Positions to Close the Part of a Losing Trade

MQL5 エキスパート

仕事が完了した

実行時間10 日
依頼者からのフィードバック
Great developer who is able to solve difficult tasks. Will definitely use him again

指定

Instead of using of using a fixed stop loss, why risk mitigation approach is to partially close part of a position and move adjust the remaining positions to breakeven. This approach works in most scenarios but fails when the position does not return to the breakeven level.

In this scenario I would like to use the profits from my remaining trades to trim back by position in a losing one. 

As a result I would like the attached EA to perform the following:

1) If Dynamic Profit2 (Line 674) - essentially measures the floating loss and profit. When this reaches a certain level of drawdown (e.g. $250), for a symbol and a side e.g. US30 Shorts. Then this time will be recorded and so will the current balance of the account. 

Scenario 1:

Lets say the drawdown event (i.e. a symbol and side = $250 drawdown and 1 Lot) was the 3rd January 2022 at 07:01 and the balance was $10,500.


All the closed profit that has been made on the account from that point onwards will be used to Partially close the position in drawdown. 

For example, let us say that other symbols have have a profit of $100 (between 7:01 and 9:00), then that equivalent amount will be used to partially close the US30 sell position (that was at $250 drawdown at 7:01). Let's say that at 9:00 the floating drawdown on US30 is $300, then the position size (originally 1.0 Lots - we can assume this did not increase), will not be reduced to 0.66 Lots. 

Note: this scenario will occur each time a trade has closed in profit.


The time will not refresh every time the drawdown on US30 reaches $250 dollars (there will be a pause period for X minutes so that it does not refresh too much).


Scenario 2:

Let us say that it is 7:01 US30 Shorts are in $250 drawdown and the pause period (i.e. the pause until the drawdown needs to be checked again) is set to 120 minutes. And using the process the lots on US30 has reduced to 0.66 Lots. During this period 7:30 there is another position USDCHF that has just reached the drawdown level of $250. In this scenario, the drawdown reduction process will be carried out on the symbol that has more recently hit the drawdown / or the one that has the highest drawdown (whichever is easier to code).

The Partial Close will keep happening until the drawdown on the symbol reaches a certain level e.g. $100.


Note: 

Please check the screenshot provide for a visual representation 





応答済み

1
開発者 1
評価
(19)
プロジェクト
33
55%
仲裁
5
80% / 20%
期限切れ
3
9%
暇
2
開発者 2
評価
(54)
プロジェクト
102
23%
仲裁
12
25% / 17%
期限切れ
13
13%
暇
3
開発者 3
評価
(32)
プロジェクト
57
23%
仲裁
12
67% / 8%
期限切れ
2
4%
暇
類似した注文
I am looking to purchase an existing, fully developed and operational XAUUSD scalping Expert Advisor (EA) for MetaTrader 5. IMPORTANT: I am NOT looking for new development, custom programming, or an experimental strategy. I am only interested in an existing, ready-made and proven trading system. Requirements: Fully automated XAUUSD scalping EA for MT5. Short-duration trades with an active trading frequency. Hard Stop
UPGRADE OF EXISTING MT5 MULTI-ASSET TREND EA I want to upgrade my existing MT5 Expert Advisor into a professional multi-asset trend-following trading system. The EA must support three asset categories: 1. Forex – 7 recommended currency pairs. 2. Synthetic Indices – 2 recommended instruments. 3. Gold – XAUUSD. The EA must support two independent trading modes: - Scalping Mode. - Swing Mode. 1. INDEPENDENT INSTRUMENT
The idea of the trading system is as follows : market entries are performed when MACD's main and signal lines intersect in the current trend direction . 2. Trend is determined based on the Exponential Moving Average with the specified period (InpMATrendPeriod). If the current EMA value is greater than the previous one, the trend is seen as growing (ema_current > ema_previous). Alternatively, if current EMA is
I want experience developer , developing on new ea , but my hand in ex5 file only .I need modify my ea file iwant to fixing on daily profit maximum percentage and maximum loss production
hello my friends i do spx and qqq trading options in my school a learned to use tc 2000 charts but not accurate im looking for good strategies that include marketmaker moving too and support resistencies tendencies too how can you help me? thanks
Looking to Purchase a Proven and Profitable XAUUSD Scalping EA for MT4 I am looking to purchase an existing, fully automated Gold (XAUUSD) scalping EA specifically designed for MetaTrader 4 (MT4) , with proven and verifiable real-money trading performance. Mandatory Requirements: Exclusively designed for XAUUSD (Gold). Fully automated trading on MetaTrader 4. Genuine scalping strategy with relatively short trade
Project Overview I am looking for an experienced MQL5 developer to develop a custom, tick-based Traditional Renko engine for MetaTrader 5. The objective of this initial project is to build a reliable Renko engine that generates confirmed Renko bricks from historical and live market ticks and exposes the complete brick data programmatically for integration with a separately developed Expert Advisor. This is Phase 1 of
PROMPT: BUILD A FAST SCALPING TRADING ROBOT (MT5 EA) Develop a fully automated, fast scalping Expert Advisor (EA) for MetaTrader 5 (MT5). 1. Lot Size Management Use a fixed lot size of exactly 0.02 lots . Never increase the lot size. Do not use martingale. Do not use lot multipliers. Every new trade must use 0.02 lots. 2. Trading Strategy Designed exclusively for fast scalping. Look for frequent, high-probability
Write an MQL5 Expert Advisor (EA) for MetaTrader 5. Trading logic: - On each new bar, check the last closed candle. - If the candle is bearish (close below open), open a SELL. - If the candle is bullish (close above open), open a BUY. - If open equals close (doji), do nothing. Inputs (adjustable by the user): - Lot size - Stop Loss in points - Take Profit in points - Maximum number of open positions allowed - Magic
I need an experienced MQL5 developer to build a stable, fully automated Gold (XAUUSD) trading Expert Advisor for MetaTrader 5 (works on Cent and Standard accounts).Key Requirements:1. Delivery: Both compiled .ex5 file and complete editable .mq5 source code. 2. License: No expiry date (Lifetime) and unlimited trading accounts. 3. Account Protection: Ability to restrict usage only to accounts under my Broker IB/Partner

プロジェクト情報

予算
60+ USD
締め切り
最高 3 日