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

MQL5 Esperti

Lavoro terminato

Tempo di esecuzione 10 giorni
Feedback del cliente
Great developer who is able to solve difficult tasks. Will definitely use him again

Specifiche

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 





Con risposta

1
Sviluppatore 1
Valutazioni
(20)
Progetti
33
55%
Arbitraggio
5
80% / 20%
In ritardo
3
9%
Gratuito
2
Sviluppatore 2
Valutazioni
(52)
Progetti
97
24%
Arbitraggio
10
20% / 20%
In ritardo
12
12%
In elaborazione
3
Sviluppatore 3
Valutazioni
(30)
Progetti
55
22%
Arbitraggio
12
67% / 8%
In ritardo
2
4%
Gratuito
Ordini simili
Hello, send robot models with a solid strategy (to trade forex), I want to use it to make money for the week. It is important that you present me with your profitability graph and a test. I also want to hire him for future jobs
I am looking to develop an automated trading bot based on a strategy involving the crossing of four Simple Moving Averages (SMA). The bot should be capable of entering trades based on this strategy. Additionally, I would like to incorporate some custom diversions tailored for NinjaTrader
Seeking an experienced MQL5 developer to create a sophisticated Expert Advisor focused on harmonic pattern trading . The EA will be designed to identify and trade based on popular harmonic patterns in the forex market. Entry and Exit Logic: Develop smart entry and exit rules based on pattern completions and price action confirmations. Risk Management: Incorporate adjustable risk-per-trade settings and position sizing
preciso de um robô com duas médias móveis, uma exponencial high e uma exponencial low. preciso também ter a opção de utilizar e todos os tempos gráficos e alterar os parâmetros das médias. entrada de compra será feita quando um candle de alta romper e fechar a cima da média high e fechará a posição quando um candle de baixa romper e fechar a baixo da média low. a venda será feita quando o candle de baixa romper e
Description - An expert advisor(s), placing sell trades in EUR/USD, based on the close price of the previous two candles, as shown in the figure below. The trades would be made in the 5 minute, 1 hour, and 1 day timeframes. In the 5 minute and 1 hour timeframes the market orders would be placed at the start of a new candle, at specific times EST. The order would be cancelled at the close of that candle, i.e after 5
Hi, I have an indicator from my friend, I want to copy it to my own Traidingview or MT5 can you do that for me. Here is the link
Develop a simple trading robot from rainbow oscillator Additional features Include timeframe specification in rainbow oscillator trailing features moving average filter TP (true/false) SL (true/false) Fixed lot Risk percentage Percentage profit lock
Hi, I have an indicator from my friend, I want to copy it to my own Traidingview or MT5 can you do that for me. Here is the link
I need a dashboard that shows my various accounts that shows balance, equity, number of trades open, drawdown and some more information. I want to use it to monitor my accounts in one screen or chart. If there is anyone who can do it please show me the screenshot of your sample
Hi, I need a robot, which wil get instructions to trade in 3 symbols at the same time based on few parameters and calculations. Example: There is 1 symbol called Gold-Near and the rate for it is 1000-1002 If i specify that when the rate reaches 1050, it should sell 1 lot Upon execution it will have to sell 1 lot of cme gold, buy 3 lots of mcx gold and buy currently (lots will be based on calculation). All the

Informazioni sul progetto

Budget
60+ USD
Per lo sviluppatore
54 USD
Scadenze
a 3 giorno(i)