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

MQL5 Experts

Job finished

Execution time 10 days
Feedback from customer
Great developer who is able to solve difficult tasks. Will definitely use him again

Specification

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 





Responded

1
Developer 1
Rating
(20)
Projects
33
55%
Arbitration
5
80% / 20%
Overdue
3
9%
Free
2
Developer 2
Rating
(52)
Projects
96
24%
Arbitration
9
22% / 22%
Overdue
12
13%
Working
3
Developer 3
Rating
(30)
Projects
55
22%
Arbitration
12
67% / 8%
Overdue
2
4%
Free
Similar orders
Expert Advisor (EA) will provide automatic entry and exit using Black Dragon indicator as per the description below. Long (entry): on the first blue candle. Long (exit): on the first red candle, stop loss or take profit/break-even. Whatever happens first. Short (entry): on the first red candle. Short (exit): on the first blue candle, stop loss or take profit/break-even. Whatever happens first. Long (stop loss value)
1. **Timeframe and Liquidity:** Focus on the 5-minute timeframe for liquidity analysis.(timeframe for liquidity should be editble) 2. **Candlestick MSS:** Monitor 1-minute candlestick patterns for entry signals.(should be editble) 3. **Swing Points:** Identify swing points using the high and low of the last three candles.(ict swimg high and low) 4. **Sell Setup:** - Wait for a 5-minute candle to take out the swing
Hello Greetings. I have a custom tradingview strategy I would like to convert to Metatrader 5 ( mt5 ) . I have the source code a and with me. Kindly bid if it is what you can do for me and let discuss about the project. Thanks
I'm looking for a developer who has already working on a HFT tailored to pass prop firm challenges within a short period, maintaining a very low drawdown. Here is a link to a video demonstrating an existing EA executing the same strategy: https://youtu.be/N6NEcIpPzV4 Any developer having already worked on this type of project and able to provide quickly a test version is welcome to contact me
have trade signals i get by telegram messaging, i would like to have a robot designed to read those message for trade inputs and open and close trades base on the signals Ea must be able to scan my telegram Message app Read signals sent Open trades on the mt4 and manage them to close Read signals every one minute (user changeable input) I also need the programmer to teach me how to install and make the robot work
MACD EA 50+ USD
Hello Freelancers, I am seeking an experienced developer to create an Expert Advisor (EA) for MetaTrader 5 (MT5). The EA will be based on the MACD indicator and should adhere to the following specifications: EA Requirements: Trading Logic: 1. Long Trades: • Entry: Open a long trade when the MACD line crosses above the signal line below the zero level. • Exit: Close the long trade when the signal line crosses above
EA Configuration. FIBO ------------------------------------------------------------------- Magic: 123456 Stop: Real or Virtual Order: Pending / CLOSE / price== LOT Description: 0.01 ------------------------------------------------------------------- STOP: -0.25 ------------------------------------------------------------------- ENT_1: 1.00 Lot_1: 0.01 ENT_2: 0.50 Lot_2: 0.01 ENT_3: 1.00 Lot_3: 0.01
Hi I'm looking for a professional programmer to modify my EA the EA send signal alert to telegram and screen shot of the chart patterns my EA is dased to the harmonic pattern but I want to see on the screen shot the pattern of the harmonic pattern and on the chat as well
Hello I need create simple trend first candle session EA. Ea wait for first M5/M15/M30/H1 (all possible timeframes to choose) candle at asian, european and NYC session and open buy/sell stop order above (in long situation) or below (in short situation) x points from highest/lowest point of the first candle. + trailing stop loss stop loss take profit breakeven magic key
Hello Guys ! Looking for a developer to create a EA for my Buy and Sell No repaint indicator. I only have the EX4 indicator file and I want the EA to take trades according to the Buy and sells signals generated by the Indicator. Here are some inputs I want for the EA: - Trailing stop - TP and SL ( in pips ) - Entries, TP and SL ( based on opposite signals arrow ) - Daily target ( in Dollars $ or % ) - Trading hours -

Project information

Budget
60+ USD
For the developer
54 USD
Deadline
to 3 day(s)